Browse Source

[feat] 销售管理

新增销售发起售后选择设备Vo类
新增销售订单发起售后前端页面
新增销售订单发起售后物料选择前端页面
销售订单新增售后选择设备Vo类集合成员变量
修改根据销售订单查询销售子表数据集合后端接口
销售订单新增发起售后后端接口
销售订单新增发起售后加载销售单号有关的物料信息弹窗后端接口
销售发起售后通知新增修改保存发起售后后端接口
销售发起售后通知新增查找与销售订单号有关的物料信息后端接口
销售订单前端页面新增 出货和售后权限注解
dev
liuxiaoxu 4 months ago
parent
commit
4ea543a6ae
  1. 35
      ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesAftersalesNoticeController.java
  2. 6
      ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesAftersalesNoticeService.java
  3. 40
      ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesAftersalesNoticeServiceImpl.java
  4. 23
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java
  5. 12
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java
  6. 88
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/SelectAftersalesNoticeVO.java
  7. 2
      ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml
  8. 18
      ruoyi-admin/src/main/resources/templates/system/salesOrder/salesOrder.html
  9. 283
      ruoyi-admin/src/main/resources/templates/system/salesOrder/startAftersales.html
  10. 86
      ruoyi-admin/src/main/resources/templates/system/salesOrder/startAftersalesMaterialSelect.html

35
ruoyi-admin/src/main/java/com/ruoyi/sales/controller/SalesAftersalesNoticeController.java

@ -5,7 +5,11 @@ import java.util.List;
import com.ruoyi.aftersales.service.IAftersalesOrderService;
import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.quality.domain.VO.CheckoutMaterialVO;
import com.ruoyi.sales.domain.VO.SalesAftersalesNoticeVO;
import com.ruoyi.system.domain.SysSalesOrder;
import com.ruoyi.system.domain.Vo.SelectAftersalesNoticeVO;
import com.ruoyi.system.service.ISysSalesOrderService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.runtime.ProcessInstance;
@ -55,6 +59,9 @@ public class SalesAftersalesNoticeController extends BaseController
@Autowired
private IAftersalesOrderService aftersalesOrderService;
@Autowired
private ISysSalesOrderService sysSalesOrderService;
@RequiresPermissions("sales:afterSalesNotice:view")
@GetMapping()
@ -115,6 +122,34 @@ public class SalesAftersalesNoticeController extends BaseController
}
/**
* 修改保存发起售后
*/
@RequiresPermissions("sales:afterSalesNotice:startAftersales")
@Log(title = "销售售后通知", businessType = BusinessType.UPDATE)
@PostMapping("/startAftersales")
@ResponseBody
public AjaxResult startAftersalesSave(@RequestBody SysSalesOrder sysSalesOrder)
{
return AjaxResult.success();
}
/**
* 查找与销售订单号有关的物料信息
* */
@ResponseBody
@PostMapping("/getMaterialInfoBySalesOrderCode")
public TableDataInfo getMaterialInfoBySalesOrderCode(@RequestParam String salesOrderCode){
startPage();
List<SelectAftersalesNoticeVO> list = salesAftersalesNoticeService.selectMaterialInfoBySalesOrderCode(salesOrderCode);
return getDataTable(list);
}
/**
* 加载审批弹窗

6
ruoyi-admin/src/main/java/com/ruoyi/sales/service/ISalesAftersalesNoticeService.java

@ -5,6 +5,7 @@ import java.util.List;
import com.ruoyi.aftersales.domain.AftersalesOrder;
import com.ruoyi.sales.domain.SalesAftersalesNotice;
import com.ruoyi.sales.domain.VO.SalesAftersalesNoticeVO;
import com.ruoyi.system.domain.Vo.SelectAftersalesNoticeVO;
import org.activiti.engine.runtime.ProcessInstance;
/**
@ -88,4 +89,9 @@ public interface ISalesAftersalesNoticeService
* 根据售后单号查询销售售后通知单
* */
SalesAftersalesNoticeVO selectSalesAftersalesNoticeByCode(String aftersalesNoticeCode);
/**
* 根据销售单号查询售后通知单Vo类
* */
List<SelectAftersalesNoticeVO> selectMaterialInfoBySalesOrderCode(String salesOrderCode);
}

40
ruoyi-admin/src/main/java/com/ruoyi/sales/service/impl/SalesAftersalesNoticeServiceImpl.java

@ -1,9 +1,6 @@
package com.ruoyi.sales.service.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.*;
import com.github.pagehelper.Page;
import com.ruoyi.common.core.domain.entity.SysUser;
@ -16,8 +13,12 @@ import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.process.todoitem.mapper.BizTodoItemMapper;
import com.ruoyi.sales.domain.VO.SalesAftersalesNoticeVO;
import com.ruoyi.system.domain.SysSalesOrderChild;
import com.ruoyi.system.domain.Vo.SelectAftersalesNoticeVO;
import com.ruoyi.system.mapper.SysSalesOrderChildMapper;
import com.ruoyi.system.mapper.SysUserMapper;
import com.ruoyi.system.service.ISysRoleService;
import lombok.extern.slf4j.Slf4j;
import org.activiti.engine.TaskService;
import org.activiti.engine.impl.persistence.entity.TaskEntityImpl;
import org.activiti.engine.runtime.ProcessInstance;
@ -29,6 +30,7 @@ import com.ruoyi.sales.domain.SalesAftersalesNotice;
import com.ruoyi.sales.service.ISalesAftersalesNoticeService;
import com.ruoyi.common.core.text.Convert;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
/**
* 售后通知单Service业务层处理
@ -36,6 +38,8 @@ import org.springframework.transaction.annotation.Transactional;
* @author 刘晓旭
* @date 2024-04-15
*/
@Slf4j
@Service
public class SalesAftersalesNoticeServiceImpl implements ISalesAftersalesNoticeService
{
@ -60,6 +64,8 @@ public class SalesAftersalesNoticeServiceImpl implements ISalesAftersalesNoticeS
@Autowired
private BizTodoItemMapper todoItemMapper;
@Autowired
private SysSalesOrderChildMapper sysSalesOrderChildMapper;
/**
* 查询售后通知单
@ -251,6 +257,32 @@ public class SalesAftersalesNoticeServiceImpl implements ISalesAftersalesNoticeS
return salesAftersalesNoticeMapper.selectSalesAftersalesNoticeByCode(aftersalesNoticeCode);
}
/**
* 根据销售单号查询售后通知单Vo类
* */
@Override
public List<SelectAftersalesNoticeVO> selectMaterialInfoBySalesOrderCode(String salesOrderCode) {
ArrayList<SelectAftersalesNoticeVO> selectAftersalesNoticeVOS = new ArrayList<>();
List<SysSalesOrderChild> sysSalesOrderChildList = sysSalesOrderChildMapper.selectOrderChildListBySalesOrderCode(salesOrderCode);
if (CollectionUtils.isEmpty(sysSalesOrderChildList)){
log.warn("与销售订单子表关联的销售单号为空:{}",salesOrderCode);
}
for (SysSalesOrderChild sysSalesOrderChild : sysSalesOrderChildList) {
SelectAftersalesNoticeVO selectAftersalesNoticeVO = new SelectAftersalesNoticeVO();
selectAftersalesNoticeVO.setMaterialNo(sysSalesOrderChild.getMaterialCode());
selectAftersalesNoticeVO.setMaterialName(sysSalesOrderChild.getMaterialName());
selectAftersalesNoticeVO.setMaterialBrand(sysSalesOrderChild.getBrand());
selectAftersalesNoticeVO.setMaterialType(sysSalesOrderChild.getMaterialType());
selectAftersalesNoticeVO.setMaterialUnit(sysSalesOrderChild.getUnit());
selectAftersalesNoticeVO.setMaterialProcessMethod(sysSalesOrderChild.getProcessMethod());
selectAftersalesNoticeVO.setMaterialDescribe(sysSalesOrderChild.getDescribe());
selectAftersalesNoticeVO.setShippedGoodsSum(sysSalesOrderChild.getOutBoundQuantity());
selectAftersalesNoticeVOS.add(selectAftersalesNoticeVO);
}
return selectAftersalesNoticeVOS;
}
/**
* 创建售后单审核流程

23
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java

@ -559,4 +559,27 @@ public class SysSalesOrderController extends BaseController
List<SysSalesOrderChild> list = sysSalesOrderChildService.selectOrderChildListBySalesOrderCode(salesOrderCode);
return getDataTable(list) ;
}
/**
* 发起售后
*/
@GetMapping("/startAftersales/{salesOrderId}")
public String startAftersales(@PathVariable("salesOrderId") Long salesOrderId, ModelMap mmap)
{
SysSalesOrder sysSalesOrder = sysSalesOrderService.selectSysSalesOrderById(salesOrderId);
mmap.put("sysSalesOrder", sysSalesOrder);
return prefix + "/startAftersales";
}
/**
* 发起售后加载销售单号有关的物料信息弹窗
*/
@GetMapping("/startAftersalesMaterialSelect")
public String materialSelect(@RequestParam String salesOrderCode, ModelMap modelMap)
{
modelMap.put("salesOrderCode",salesOrderCode);
return prefix + "/startAftersalesMaterialSelect";
}
}

12
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSalesOrder.java

@ -1,6 +1,7 @@
package com.ruoyi.system.domain;
import com.google.common.base.Objects;
import com.ruoyi.system.domain.Vo.SelectAftersalesNoticeVO;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
@ -161,6 +162,9 @@ public class SysSalesOrder extends BaseEntity {
private List<SysSalesOrderChild> sysSalesOrderChildList;
private List<SelectAftersalesNoticeVO> selectAftersalesNoticeVOList;
public Long getSalesOrderId() {
return salesOrderId;
}
@ -657,6 +661,14 @@ public class SysSalesOrder extends BaseEntity {
this.sysSalesOrderChildList = sysSalesOrderChildList;
}
public List<SelectAftersalesNoticeVO> getSelectAftersalesNoticeVOList() {
return selectAftersalesNoticeVOList;
}
public void setSelectAftersalesNoticeVOList(List<SelectAftersalesNoticeVO> selectAftersalesNoticeVOList) {
this.selectAftersalesNoticeVOList = selectAftersalesNoticeVOList;
}
@Override
public String toString() {
return Objects.toStringHelper(this)

88
ruoyi-admin/src/main/java/com/ruoyi/system/domain/Vo/SelectAftersalesNoticeVO.java

@ -0,0 +1,88 @@
package com.ruoyi.system.domain.Vo;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;
@Data
/*销售发起售后选择设备*/
public class SelectAftersalesNoticeVO {
private static final long serialVersionUID = 1L;
/** 售后通知单详情ID */
private Long aftersalesNoticeDetailId;
/** 售后通知单号 */
@Excel(name = "售后通知单号")
private String aftersalesNoticeCode;
/** 关联生产订单号 */
private String makeNo;
/** 关联销售订单编号 */
private String salesOrderCode;
/** 用户ID */
private Long userId;
/** 紧急程度(0一般、1紧急) */
@Excel(name = "紧急程度", readConverterExp = "0=一般、1紧急")
private String emergencyDegree;
/** 售后问题 */
@Excel(name = "售后问题")
private String aftersalesProblem;
/** 报告问题 */
@Excel(name = "报告问题")
private String aftersalesReportUrl;
/** 客户ID */
private String customerId;
/** 客户名称 */
private String customerName;
/** SN号(产品序列号) */
@Excel(name = "SN号", readConverterExp = "产=品序列号")
private String snCode;
/** 设备流水号 */
@Excel(name = "设备流水号")
private String deviceRunningNumber;
/** 物料名称 */
@Excel(name = "物料名称")
private String materialName;
/** 物料类型 */
@Excel(name = "物料类型")
private String materialType;
/** 物料图片地址 */
@Excel(name = "物料图片地址")
private String materialPhotourl;
/** 料号 */
@Excel(name = "料号")
private String materialNo;
/** 物料品牌 */
@Excel(name = "物料品牌")
private String materialBrand;
/** 物料单位 */
@Excel(name = "物料单位")
private String materialUnit;
/** 物料描述 */
@Excel(name = "物料描述")
private String materialDescribe;
/** 物料加工方式 */
@Excel(name = "物料加工方式")
private String materialProcessMethod;
/** 已出库数量 */
@Excel(name = "已出库数量")
private Integer shippedGoodsSum;
}

2
ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml

@ -90,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectOrderChildListBySalesOrderCode" resultMap="SysSalesOrderChildResult">
select id, quoteId, materialId, materialCode, materialName, materialType, processMethod, brand,
warehouseDept,materialNum, photoUrl,finish_num,apply_shipping_num,has_apply_shipping_num
warehouseDept,materialNum, photoUrl,finish_num,apply_shipping_num,has_apply_shipping_num,out_bound_quantity
from sys_sales_order_child
where quoteId = #{quoteId}
</select>

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

@ -196,6 +196,10 @@
<script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:salesOrder:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:salesOrder:remove')}]];
var salesDeliverGoodsFlag = [[${@permission.hasPermi('system:salesOrder:salesDeliverGoods')}]];
var startAftersalesFlag = [[${@permission.hasPermi('sales:afterSalesNotice:startAftersales')}]];
var salesOrderTypeDatas = [[${@dict.getType('sys_order_type')}]];
var useStatusDatas = [[${@dict.getType('useStatus')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
@ -358,11 +362,13 @@
// 生产状态部分完成/全部完成
if (row.makeStatus == "5" || row.makeStatus == "6"){
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="salesDeliverGoods(\'' + row.salesOrderId + '\')"><i class="fa fa-edit"></i> 出货</a> ');
actions.push('<a class="btn btn-success btn-xs ' + salesDeliverGoodsFlag + '" href="javascript:void(0)" onclick="salesDeliverGoods(\'' + row.salesOrderId + '\')"><i class="fa fa-edit"></i>出货</a> ');
}
if (row.closeStatus == 3){
actions.push('<a class="btn btn-success btn-xs ' + startAftersalesFlag + '" href="javascript:void(0)" onclick="startAftersales(\'' + row.salesOrderId + '\')"><i class="fa fa-edit"></i>售后</a> ');
}
// 详情
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.salesOrderId + '\')"><i class="fa fa-eye"></i> 详情</a> ');
actions.push('<a class="btn btn-primary btn-xs " href="javascript:void(0)" onclick="$.operate.detail(\'' + row.salesOrderId + '\')"><i class="fa fa-eye"></i> 详情</a> ');
return actions.join('');
}
}
@ -381,6 +387,12 @@
var url = prefix + "/salesDeliverGoods/" + salesOrderId;
$.modal.open("出货",url);
}
//售后
function startAftersales(salesOrderId){
var url = prefix + "/startAftersales/" + salesOrderId;
$.modal.open("售后",url);
}
</script>
</body>
</html>

283
ruoyi-admin/src/main/resources/templates/system/salesOrder/startAftersales.html

@ -0,0 +1,283 @@
<!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-startAftersales-edit" th:object="${sysSalesOrder}">
<input name="salesOrderId" th:field="*{salesOrderId}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label">订单类型:</label>
<div class="col-sm-8">
<select name="salesOrderType" class="form-control m-b" th:with="type=${@dict.getType('sys_order_type')}" disabled>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{salesOrderType}"></option>
</select>
</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" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户ID:</label>
<div class="col-sm-8">
<input name="enterpriseCode" th:field="*{enterpriseCode}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">客户名称:</label>
<div class="col-sm-8">
<input name="enterpriseName" th:field="*{enterpriseName}" class="form-control" type="text" readonly>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收货联系人:</label>
<div class="col-sm-8">
<input name="customerDelivery" th:field="*{customerDelivery}" class="form-control" type="text" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">收货电话:</label>
<div class="col-sm-8">
<input name="deliveryPhone" th:field="*{deliveryPhone}" class="form-control" type="text" disabled>
</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" disabled>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<input name="remark" th:field="*{remark}" class="form-control" type="text">
</div>
</div>
</form>
<!--物料信息-->
<div class="container">
<div class="form-row">
<div class="btn-group-sm" id="toolbar" role="group">
<span>选择物料</span>
<a class="btn btn-success" onclick="insertRow()">
<i class="fa fa-plus"></i> 选择物料
</a>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
</div>
</div>
</div>
</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 sysSalesOrder = [[${sysSalesOrder}]];
var prefix = ctx + "sales/afterSalesNotice";
$("#form-startAftersales-edit").validate({
focusCleanup: true
});
// 新增提交
function submitHandler() {
// 获取表单数据
const salesOrderData = $("#form-startAftersales-edit").serializeArray().reduce((obj, item) => {
obj[item.name] = item.value;
return obj;
}, {});
// 获取bootstrap-table的数据,这里假设你使用bootstrap-table的API获取所有数据
var table = $('#bootstrap-table').bootstrapTable('getData');
// 将表数据转换成与complaintNoticeData格式一致的数组
var materialDataList = table.map(function(item) {
// 根据实际字段名调整
return {
materialNo:item.materialNo,
materialPhotourl:item.materialPhotourl,
materialName: item.materialName,
materialType: item.materialType,
materialDescribe: item.materialDescribe,
materialBrand: item.materialBrand,
materialUnit: item.materialUnit,
materialProcessMethod: item.materialProcessMethod,
shippedGoodsSum: item.shippedGoodsSum,
snCode:item.snCode,
aftersalesProblem:item.aftersalesProblem,
emergencyDegree:item.emergencyDegree,
aftersalesReportUrl:item.aftersalesReportUrl,
// ...其他字段
};
});
const combinedData = Object.assign({}, salesOrderData, {
selectAftersalesNoticeVOList: materialDataList,
});
// 合并表单数据和表格数据
console.log(combinedData)
// 使用 JSON.stringify() 序列化数据
const jsonData = JSON.stringify(combinedData);
// 发送 AJAX 请求到后端接口
$.operate.saveJson(prefix + "/startAftersales", jsonData);
}
/*选择物料按钮*/
function insertRow() {
var selectedSalesOrderCode = $("#salesOrderCode").val();
var encodedSalesOrderCode = encodeURIComponent(selectedSalesOrderCode);
var url = ctx + 'system/salesOrder/startAftersalesMaterialSelect?salesOrderCode=' + encodedSalesOrderCode;
var options = {
title: '选择物料',
url: url,
callBack: doSubmit
};
$.modal.openOptions(options);
}
function doSubmit(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-startAftersalesMaterialSelect-table').bootstrapTable('getSelections')[0];
//判断是否重复
var rows = $("#bootstrap-table").bootstrapTable('getData').length;
for(var i=0;i<rows;i++){
var data = $("#bootstrap-table").bootstrapTable('getData')[i];
if(data.materialNo==rowData.materialNo){
$.modal.alertError("不能选择已添加过的相同料号");
return;
}
}
console.log("rowData: "+rowData);
$("#bootstrap-table").bootstrapTable('insertRow', {
index:1,
row: {
materialNo:rowData.materialNo,
materialPhotourl:rowData.materialPhotourl,
materialName: rowData.materialName,
materialType: rowData.materialType,
materialDescribe: rowData.materialDescribe,
materialBrand: rowData.materialBrand,
materialUnit: rowData.materialUnit,
materialProcessMethod: rowData.materialProcessMethod,
shippedGoodsSum: rowData.shippedGoodsSum,
snCode:"",
aftersalesProblem:"",
emergencyDegree:"",
aftersalesReportUrl:"",
}
})
layer.close(index);
}
//物料信息展示列表
$(function() {
var options = {
modalName: "选择物料",
queryParams: queryParams,
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
pagination: false, // 设置不分页
columns: [{
checkbox: true
},
{
title: '料号',
field: 'materialNo',
},
{
title: '图片',
field: 'materialPhotourl',
},
{
title: '物料名称',
field: 'materialName',
},
{
title: '物料类型',
field: 'materialType',
},
{
title: '单位',
field: 'materialUnit',
},
{
title: '品牌',
field: 'materialBrand',
},
{
title: '描述',
field: 'materialDescribe',
},
{
title: '已出库数量',
field: 'shippedGoodsSum',
},
{
title: '设备SN',
field: 'snCode',
editable: {
type: 'text', // 表示该列可以被编辑为文本
},
},
{
title: '售后问题',
field: 'aftersalesProblem',
editable: {
type: 'text',
},
},
{
title: '紧急程度',
field: 'emergencyDegree',
editable: {
type: 'select',
title: '紧急程度',
source:[{value:"0",text:"一般"},{value:"1",text:"紧急"}]
},
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeRow(\'' + row.materialNo + '\')"><i class="fa fa-remove"></i>删除</a> ');
return actions.join('');
}
}
]
};
$.table.init(options);
})
function queryParams(params) {
var curParams = {
// 传递参数查询参数
salesOrderCode: sysSalesOrder.salesOrderCode
};
return curParams;
}
</script>
</body>
</html>

86
ruoyi-admin/src/main/resources/templates/system/salesOrder/startAftersalesMaterialSelect.html

@ -0,0 +1,86 @@
<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<th:block th:include="include :: header('发起售后选择物料信息列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-startAftersalesMaterialSelect-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "sales/afterSalesNotice";
// 从后端拿到传入的makeNo
var salesOrderCode = /*[[${salesOrderCode}]]*/ '';
$(function() {
var options = {
id: 'bootstrap-startAftersalesMaterialSelect-table',
clickToSelect: true, // 点击选中行
singleSelect: true, // 单选
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
pagination: false, // 设置不分页
url: prefix + "/getMaterialInfoBySalesOrderCode",
queryParams:queryParams,
modalName: "物料信息",
columns: [{
checkbox: true
},
{
title: '料号',
field: 'materialNo',
},
{
title: '图片',
field: 'materialPhotourl',
},
{
title: '物料名称',
field: 'materialName',
},
{
title: '类型',
field: 'materialType',
},
{
title: '描述',
field: 'materialDescribe',
},
{
title: '品牌',
field: 'materialBrand',
},
{
title: '单位',
field: 'materialUnit',
},
{
title: '半成品类型',
field: 'materialProcessMethod',
},
{
title: '已出库数量',
field: 'shippedGoodsSum'
}
]
};
$.table.init(options);
});
function queryParams(params) {
var curParams = {
// 现在使用从Thymeleaf传过来的makeNo
salesOrderCode: salesOrderCode
};
return curParams;
}
</script>
</body>
</html>
Loading…
Cancel
Save