Browse Source

[feat] 售后管理

售后维护设备出库前端新增 售后第一次维护设备前端接口
售后第一次维护设备后端Controller新增 售后第一次维护设备接口、修改保存售后第一次维护设备接口、展示售后第一次维护设备需要维护出货物料信息接口,满足只展示成品、展示售后第一次维护设备不需要维护出货物料信息接口,满足展示除成品之外的物料信息
售后维护设备子表新增根据出库单号查询详情集合后端接口
新增售后第一次维护设备前端列表页面
修改出库单准备物料前端页面:子表数据加上 订单数量和已出库数量
修改销售订单出货前端页面,修改申请出货数的校验规则
dev
liuxiaoxu 3 weeks ago
parent
commit
513a914f64
  1. 136
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesOutOrderController.java
  2. 5
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AftersalesOutOrderDetailMapper.java
  3. 23
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesOutOrderService.java
  4. 48
      ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesOutOrderServiceImpl.java
  5. 5
      ruoyi-admin/src/main/resources/mapper/aftersales/AftersalesOutOrderDetailMapper.xml
  6. 9
      ruoyi-admin/src/main/resources/templates/aftersales/aftersalesOutOrder/aftersalesOutOrder.html
  7. 476
      ruoyi-admin/src/main/resources/templates/aftersales/aftersalesOutOrder/maintenanceEquipmentOne.html
  8. 8
      ruoyi-admin/src/main/resources/templates/system/salesOrder/salesDeliverGoods.html
  9. 2
      ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/prepareMaterial.html

136
ruoyi-admin/src/main/java/com/ruoyi/aftersales/controller/AftersalesOutOrderController.java

@ -1,15 +1,13 @@
package com.ruoyi.aftersales.controller;
import java.util.List;
import com.ruoyi.aftersales.domain.AftersalesOutOrderDetail;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.aftersales.domain.AftersalesOutOrder;
@ -148,4 +146,132 @@ public class AftersalesOutOrderController extends BaseController
}
/**
* 售后第一次维护设备
*/
@GetMapping("/maintenanceEquipmentOne/{outOrderId}")
public String maintenanceEquipmentOne(@PathVariable("outOrderId") Long outOrderId, ModelMap mmap)
{
AftersalesOutOrder aftersalesOutOrder = aftersalesOutOrderService.selectAftersalesOutOrderById(outOrderId);
mmap.put("aftersalesOutOrder", aftersalesOutOrder);
return prefix + "/maintenanceEquipmentOne";
}
/**
* 修改保存售后第一次维护设备
*/
@RequiresPermissions("aftersales:aftersalesOutOrder:maintenanceEquipmentOne")
@Log(title = "售后维护设备出库", businessType = BusinessType.UPDATE)
@PostMapping("/maintenanceEquipmentOne")
@ResponseBody
public AjaxResult maintenanceEquipmentOneSave(@RequestBody AftersalesOutOrder aftersalesOutOrder)
{
return toAjax(aftersalesOutOrderService.updateMaintenanceEquipmentOne(aftersalesOutOrder));
}
/**
* 展示售后第一次维护设备需要维护出货物料信息
* */
@PostMapping("/getNeedShippingDeviceMaterialsOne")
@ResponseBody
public TableDataInfo getNeedShippingDeviceMaterialsOne(AftersalesOutOrder aftersalesOutOrder)
{
startPage();
List<AftersalesOutOrderDetail> list = aftersalesOutOrderService.getNeedShippingDeviceMaterialsOne(aftersalesOutOrder);
return getDataTable(list);
}
/**
* 展示售后第一次维护设备不需要维护出货物料信息
* */
@PostMapping("/getNoShippingDeviceMaterialsOne")
@ResponseBody
public TableDataInfo getNoShippingDeviceMaterialsOne(AftersalesOutOrder aftersalesOutOrder)
{
startPage();
List<AftersalesOutOrderDetail> list = aftersalesOutOrderService.getNoShippingDeviceMaterialsOne(aftersalesOutOrder);
return getDataTable(list);
}
//
// /**
// * 展示售后第一次维护设备料号已选择添加出货设备的相关出货设备信息
// */
// @PostMapping("/showAftersalesShippingDeviceListOne")
// @ResponseBody
// public TableDataInfo showAftersalesShippingDeviceListOne(@RequestParam("materialNo") String materialNo,
// @RequestParam("salesOrderCode") String salesOrderCode,
// @RequestParam("makeNo") String makeNo)
// {
//
// startPage();
// List<SelectShippingDeviceVO> list = aftersalesOutOrderService.showAftersalesShippingDeviceList(materialNo,salesOrderCode,makeNo);
// return getDataTable(list);
// }
//
//
//
//
// /**
// * 售后第一次维护设备 添加出货设备信息
// */
// @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";
// }
//
// /**
// * 修改保存售后第一次维护设备 添加出货设备信息
// */
// @ResponseBody
// @PostMapping("/addShippingDevicesOne")
// public AjaxResult addShippingDevicesOneSave(@RequestBody WarehouseOutOrderDetail warehouseOutOrderDetail)
// {
//
// return toAjax(outOrderDetailService.addShippingDevicesOne(warehouseOutOrderDetail));
// }
//
//
//
// /**
// * 展示售后第一次维护设备添加出货设备料号相关出货设备信息
// */
// @PostMapping("/getAllMaterialShippingDevices")
// @ResponseBody
// public TableDataInfo showAftersalesShippingDevicelist(WarehouseOutOrderDetail warehouseOutOrderDetail)
// {
//
// startPage();
// List<SelectShippingDeviceVO> list = aftersalesOutOrderService.selectAftersalesShippingDeviceList(warehouseOutOrderDetail);
// return getDataTable(list);
// }
//
//
//
// /**
// * 第一次维护设备删除物料信息出货设备信息
// */
// @Log(title = "售后维护设备出库", businessType = BusinessType.DELETE)
// @PostMapping("/deleteRow")
// @ResponseBody
// public AjaxResult deleteRow(String shippingDeviceId)
// {
// return toAjax(aftersalesOutOrderService.deleteAftersalesShippingDeviceById(shippingDeviceId));
// }
}

5
ruoyi-admin/src/main/java/com/ruoyi/aftersales/mapper/AftersalesOutOrderDetailMapper.java

@ -3,6 +3,7 @@ package com.ruoyi.aftersales.mapper;
import java.util.List;
import com.ruoyi.aftersales.domain.AftersalesOutOrderDetail;
/**
* 售后维护设备出库详情Mapper接口
*
@ -80,4 +81,8 @@ public interface AftersalesOutOrderDetailMapper
* */
int insertBatchAftersalesOutOrderDetail(List<AftersalesOutOrderDetail> aftersalesOutOrderDetails);
/**
* 根据出库单号查询详情集合
* */
List<AftersalesOutOrderDetail> selectDetailListByOutOrderCode(String outOrderCode);
}

23
ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/IAftersalesOutOrderService.java

@ -2,6 +2,7 @@ package com.ruoyi.aftersales.service;
import java.util.List;
import com.ruoyi.aftersales.domain.AftersalesOutOrder;
import com.ruoyi.aftersales.domain.AftersalesOutOrderDetail;
/**
* 售后维护设备出库Service接口
@ -72,4 +73,26 @@ public interface IAftersalesOutOrderService
* @return
*/
int restoreAftersalesOutOrderById(Long outOrderId);
/**
* 修改保存售后第一次维护设备出库
* @param aftersalesOutOrder
* @return
*/
int updateMaintenanceEquipmentOne(AftersalesOutOrder aftersalesOutOrder);
/**
* 展示售后第一次维护设备需要维护出货物料信息
* @param aftersalesOutOrder
* @return
*/
List<AftersalesOutOrderDetail> getNeedShippingDeviceMaterialsOne(AftersalesOutOrder aftersalesOutOrder);
/**
* 展示售后第一次维护设备不需要维护出货物料信息
* @param aftersalesOutOrder
* @return
*/
List<AftersalesOutOrderDetail> getNoShippingDeviceMaterialsOne(AftersalesOutOrder aftersalesOutOrder);
}

48
ruoyi-admin/src/main/java/com/ruoyi/aftersales/service/impl/AftersalesOutOrderServiceImpl.java

@ -1,6 +1,10 @@
package com.ruoyi.aftersales.service.impl;
import java.util.List;
import java.util.stream.Collectors;
import com.ruoyi.aftersales.domain.AftersalesOutOrderDetail;
import com.ruoyi.aftersales.mapper.AftersalesOutOrderDetailMapper;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -22,6 +26,9 @@ public class AftersalesOutOrderServiceImpl implements IAftersalesOutOrderService
@Autowired
private AftersalesOutOrderMapper aftersalesOutOrderMapper;
@Autowired
private AftersalesOutOrderDetailMapper aftersalesOutOrderDetailMapper;
/**
* 查询售后维护设备出库
*
@ -123,4 +130,45 @@ public class AftersalesOutOrderServiceImpl implements IAftersalesOutOrderService
{
return aftersalesOutOrderMapper.restoreAftersalesOutOrderById(outOrderId);
}
/**
* 修改保存售后第一次维护设备出库
* @param aftersalesOutOrder
* @return
*/
@Override
public int updateMaintenanceEquipmentOne(AftersalesOutOrder aftersalesOutOrder) {
return 0;
}
/**
* 展示售后第一次维护设备需要维护出货物料信息
* @param aftersalesOutOrder
* @return
*/
@Override
public List<AftersalesOutOrderDetail> getNeedShippingDeviceMaterialsOne(AftersalesOutOrder aftersalesOutOrder) {
String outOrderCode = aftersalesOutOrder.getOutOrderCode();
List<AftersalesOutOrderDetail> list = aftersalesOutOrderDetailMapper.selectDetailListByOutOrderCode(outOrderCode);
//只保留成品
List<AftersalesOutOrderDetail> filterList = list.stream().filter(item -> "chcpsb".equals(item.getMaterialType())).collect(Collectors.toList());
return filterList;
}
/**
* 展示售后第一次维护设备不需要维护出货物料信息
* @param aftersalesOutOrder
* @return
*/
@Override
public List<AftersalesOutOrderDetail> getNoShippingDeviceMaterialsOne(AftersalesOutOrder aftersalesOutOrder) {
String outOrderCode = aftersalesOutOrder.getOutOrderCode();
List<AftersalesOutOrderDetail> list = aftersalesOutOrderDetailMapper.selectDetailListByOutOrderCode(outOrderCode);
//过滤掉成品
List<AftersalesOutOrderDetail> filterList = list.stream().filter(item -> !"chcpsb".equals(item.getMaterialType())).collect(Collectors.toList());
return filterList;
}
}

5
ruoyi-admin/src/main/resources/mapper/aftersales/AftersalesOutOrderDetailMapper.xml

@ -72,6 +72,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where out_order_detail_id = #{outOrderDetailId}
</select>
<select id="selectDetailListByOutOrderCode" parameterType="String" resultMap="AftersalesOutOrderDetailResult">
<include refid="selectAftersalesOutOrderDetailVo"/>
where out_order_code = #{outOrderCode}
</select>
<insert id="insertAftersalesOutOrderDetail" parameterType="AftersalesOutOrderDetail" useGeneratedKeys="true" keyProperty="outOrderDetailId">
insert into aftersales_out_order_detail
<trim prefix="(" suffix=")" suffixOverrides=",">

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

@ -210,6 +210,15 @@
};
$.table.init(options);
});
/*售后第一次维护设备*/
function maintenanceEquipmentOne(outOrderId) {
var url = ctx + 'aftersales/aftersalesOutOrder/maintenanceEquipmentOne/'+outOrderId;
$.modal.open("售后第一次维护设备",url);
}
</script>
</body>
</html>

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

@ -0,0 +1,476 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('售后维护设备1')" />
<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-maintenanceEquipmentOne-edit" th:object="${aftersalesOutOrder}">
<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">客户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="container">
<div class="row">
<h4 class="font-weight-bold">需要维护出货设备信息</h4>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="needShippingDevice-table"></table>
</div>
</div>
</div>
<div class="container">
<div class="row">
<h4 class="font-weight-bold">无需维护出货设备信息</h4>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="noShippingDevice-table"></table>
</div>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<!--用于可以修改列表字段的插件-->
<th:block th:include="include :: bootstrap-table-editable-js" />
<script th:inline="javascript">
var addFlag = [[${@permission.hasPermi('aftersales:aftersalesOutOrder:addShippingDevices')}]];
var prefix = ctx + "aftersales/aftersalesOutOrder";
var aftersalesOutOrder = [[${aftersalesOutOrder}]];
$("#form-maintenanceEquipmentOne-edit").validate({
focusCleanup: true
});
// function submitHandler() {
// if ($.validate.form()) {
// $.operate.save(prefix + "/maintenanceEquipmentOne", $('#form-maintenanceEquipmentOne-edit').serialize());
// }
// }
function submitHandler() {
// 获取表单数据
const shippingDevicesData = $("#form-maintenanceEquipmentOne-edit").serializeArray().reduce((obj, item) => {
obj[item.name] = item.value;
return obj;
}, {});
// 在需要收集所有子表数据的地方调用此函数
var allSubData = getAllSubTablesData();
// 将表数据转换成与complaintNoticeData格式一致的数组
var equipDetailDataList = allSubData.map(function(item) {
// 根据实际字段名调整
return {
"shippingDeviceId": item.shippingDeviceId,
"deviceModelCode": item.deviceModelCode,
"deviceRunningNumber": item.deviceRunningNumber,
"makePhotoUrl": item.makePhotoUrl,
"snCode": item.snCode
// ...其他字段
};
});
// 合并表单数据和表格数据
const combinedData = Object.assign({}, shippingDevicesData, { selectShippingDeviceVOList: equipDetailDataList });
console.log(combinedData)
// 使用 JSON.stringify() 序列化数据
const jsonData = JSON.stringify(combinedData);
// 发送 AJAX 请求到后端接口
$.operate.saveJson(prefix + "/maintenanceEquipmentOne", jsonData);
}
$("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 = {
id:'needShippingDevice-table',
url: prefix + "/getNeedShippingDeviceMaterialsOne",
modalName: "物料信息",
showColumns: false,
pagination: false,
showToggle: false,
showRefresh:false,
showSearch:false,
queryParams:queryParams,
detailView: true,
onExpandRow : function(index, row, $detail) {
initChildTable(index, row, $detail);
},
columns: [{
checkbox: true
},
{ title:'销售订单号',
field:'quoteId',
visible: false
},
{
title:'出库单详情Id',
field:'outOrderDetailId',
visible: false
},
{
title: '料号',
field: 'materialNo',
},
{
title: '图片',
field: 'photoUrl',
},
{
title: '物料名称',
field: 'materialName',
},
{
title: '物料类型',
field: 'materialType',
},
{
title: '单位',
field: 'materialUnit',
},
{
title: '型号',
field: 'materialModel',
},
{
title: '品牌',
field: 'brand',
},
{
title: '描述',
field: 'describe',
},
{
title: '订单数量',
field: 'makeNum',
},
{
title: '已出库数',
field: 'hasOutOrderSum',
},
{
title: '申请出库数',
field: 'applyOutOrderSum',
},
{
title: '准备出库数',
field: 'prepareOutOrderSum',
},
{
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="addShippingDevicesOne(\'' + row.outOrderDetailId + '\')"><i class="fa fa-add"></i>添加出货设备</a>');
return actions.join('');
}
}
]
};
$.table.init(options);
})
// initChildTable = function(index, row, $detail) {
// var parentRow = row;
// var childTableId = 'child_table_'+index;
// $detail.html('<table id="'+childTableId+'"></table>');
// $('#'+childTableId).bootstrapTable({
// url: prefix + "/showAftersalesShippingDeviceListOne",
// method: 'post',
// sidePagination: "server",
// contentType: "application/x-www-form-urlencoded",
// queryParams : {
// // salesOrderCode: aftersalesOutOrder.salesOrderCode,
// materialNo: parentRow.materialNo,
// salesOrderCode:aftersalesOutOrder.salesOrderCode,
// makeNo:aftersalesOutOrder.makeNo
// },
// columns: [
// {
// title: '出货设备ID',
// field: 'shippingDeviceId',
// },
// {
// title: '设备型号',
// field: 'deviceModelCode',
// },
// {
// title: '流水号',
// field: 'deviceRunningNumber',
// },
// {
// title: '设备SN号',
// field: 'snCode',
// editable:true
// },
// {
// title: '操作',
// align: 'center',
// formatter: function (value, row, index) {
// return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="deleteRow(\'' + row.shippingDeviceId + '\')"><i class="fa fa-remove"></i>删除</a>';
// }
// }
// ],
// });
// };
function queryParams(params) {
var curParams = {
// 传递参数查询参数
outOrderCode: aftersalesOutOrder.outOrderCode
};
return curParams;
}
//不需要维护出货物料信息
$(function() {
var options = {
id:'noShippingDevice-table',
url: prefix + "/getNoShippingDeviceMaterialsOne",
modalName: "物料信息",
showColumns: false,
pagination: false,
showToggle: false,
showRefresh:false,
showSearch:false,
queryParams:queryParams,
columns: [{
checkbox: true
},
{ title:'销售订单号',
field:'quoteId',
visible: false
},
{
title:'出库单详情Id',
field:'outOrderDetailId',
visible: false
},
{
title: '料号',
field: 'materialNo',
},
{
title: '图片',
field: 'photoUrl',
},
{
title: '物料名称',
field: 'materialName',
},
{
title: '物料类型',
field: 'materialType',
},
{
title: '单位',
field: 'materialUnit',
},
{
title: '型号',
field: 'materialModel',
},
{
title: '品牌',
field: 'brand',
},
{
title: '描述',
field: 'describe',
},
{
title: '订单数量',
field: 'makeNum',
},
{
title: '已出库数',
field: 'hasOutOrderSum',
},
{
title: '申请出库数',
field: 'applyOutOrderSum',
},
{
title: '准备出库数',
field: 'prepareOutOrderSum',
},
{
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="addShippingDevicesOne(\'' + row.outOrderDetailId + '\')"><i class="fa fa-add"></i>添加出货设备</a>');
return actions.join('');
}
}
]
};
$.table.init(options);
})
// 获取所有子表数据的函数
// 获取所有子表数据的函数
function getAllSubTablesData() {
var allSubData = [];
// 获取所有被展开的行
var parentLength = $("#bootstrap-table").bootstrapTable("getData").length;
for (let i = 0; i < parentLength; i++) {
var sonData = $('#'+"child_table_" + i).bootstrapTable("getData");
//循环获取子表中存在的行数据,每个行数据转换添加到allSubData数组中
allSubData = allSubData.concat(sonData);
}
return allSubData;
}
function deleteRow(shippingDeviceId) {
// 弹出确认框询问用户是否确定删除
if (confirm("确定要删除这条记录吗?")) {
// 发送删除请求到服务器
$.ajax({
url: prefix + "/deleteRow", // 请根据实际API路径调整
type: 'POST',
data: {
shippingDeviceId: shippingDeviceId, // 传递需要删除的记录的ID
},
success: function(result) {
if (result.success) { // 假设result是一个对象,包含success属性来表示操作是否成功
// 删除操作成功,从表格中移除这一行
$('#child_table_' + index).bootstrapTable('remove', {
field: 'shippingDeviceId',
values: [shippingDeviceId]
});
toastr.success("删除成功!"); // 显示成功提示信息,这里使用toastr作为示例,确保已引入相关库
} else {
toastr.error("删除失败: " + result.message); // 显示失败原因,同样确保已引入toastr库
}
},
error: function() {
toastr.error("发生错误,删除失败!"); // 网络错误或后端错误处理
}
});
}
};
/*添加出货设备*/
// function addShippingDevicesOne(quoteId, materialCode) {
// // 确保URL编码,特别是如果materialCode中可能含有特殊字符
// var url = ctx + 'aftersales/aftersalesOutOrder/addShippingDevicesOne/' + encodeURIComponent(quoteId) + '/' + encodeURIComponent(materialCode);
// $.modal.open("添加出货设备", url);
// }
function addShippingDevicesOne(outOrderDetailId) {
var salesOrderCode = [[${aftersalesOutOrder.salesOrderCode}]];
var makeNo = [[${aftersalesOutOrder.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);
}
</script>
</body>
</html>

8
ruoyi-admin/src/main/resources/templates/system/salesOrder/salesDeliverGoods.html

@ -386,14 +386,14 @@
return '申请出货数不能为空';
}
if (isNaN(value)) {
return '申请出货数不能为空';
return '请输入有效的数字';
}
if (value < 0) {
return '申请出货数不能为空';
if (value <= 0) {
return '申请出货数必须大于0';
}
//不能为小数
if (value % 1 !== 0) {
return '申请出货数不能为';
return '申请出货数不能为小数';
}
},
},

2
ruoyi-admin/src/main/resources/templates/warehouse/warehouseOutOrder/prepareMaterial.html

@ -128,6 +128,8 @@
"materialBrand": item.materialBrand,
"materialUnit": item.materialUnit,
"materialProcessMethod": item.materialProcessMethod,
"makeNum": item.makeNum,
"hasOutOrderSum": item.hasOutOrderSum,
"applyOutOrderSum": item.applyOutOrderSum,
"prepareOutOrderSum": item.prepareOutOrderSum,
// ...其他字段

Loading…
Cancel
Save