Browse Source

[feat] 工程管理

修改开发修改单新增前端页面:新增动态查询生产单号前端方法:解决查询不到生产单号问题;新增修改完成时间字段;新增选择开发修改单物料前端方法;新增点击选择物料按钮前端方法;新增开发修改物料前端列表展示方法;新增逻辑删除开发修改物料前端列表一行数据方法;
新增加载所有生产单号后端接口
新增加载物料信息选择弹窗后端接口
新增物料选择页面弹窗的前端页面
dev
liuxiaoxu 7 months ago
parent
commit
77ce36392f
  1. 45
      ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java
  2. 1
      ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml
  3. 539
      ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html
  4. 76
      ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/developModifyOrderMaterialSelect.html

45
ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java

@ -3,16 +3,17 @@ package com.ruoyi.erp.controller;
import java.util.List;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.system.domain.SysMakeOrder;
import com.ruoyi.system.domain.SysMakeorderDept;
import com.ruoyi.system.domain.SysSalesOrderChild;
import com.ruoyi.system.mapper.SysMakeOrderMapper;
import com.ruoyi.system.service.ISysSalesOrderChildService;
import com.ruoyi.system.service.ISysUserService;
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.erp.domain.ErpDevelopModifyorder;
@ -40,6 +41,12 @@ public class ErpDevelopModifyorderController extends BaseController
@Autowired
private IErpDevelopModifyorderService erpDevelopModifyorderService;
@Autowired
private SysMakeOrderMapper sysMakeOrderMapper;
@Autowired
private ISysSalesOrderChildService sysSalesOrderChildService;
@RequiresPermissions("erp:developModifyOrder:view")
@GetMapping()
public String developModifyOrder()
@ -106,6 +113,30 @@ public class ErpDevelopModifyorderController extends BaseController
return toAjax(erpDevelopModifyorderService.insertErpDevelopModifyorder(erpDevelopModifyorder));
}
/**
* 加载物料信息选择弹窗
*/
@GetMapping("/developModifyMaterialSelect")
public String materialSelect(@RequestParam String makeNo, ModelMap modelMap)
{
modelMap.put("makeNo",makeNo);
return prefix + "/developModifyOrderMaterialSelect";
}
/**
* 查找与生产单号有关的物料信息列表
*/
@PostMapping("/getMaterialListByMakeNo")
@ResponseBody
public TableDataInfo getMaterialListByMakeNo(@RequestParam("makeNo") String makeNo)
{
startPage();
SysMakeOrder sysMakeOrder = sysMakeOrderMapper.selectSaleNoByMakeNo(makeNo);
List<SysSalesOrderChild> list = sysSalesOrderChildService.selectSysSalesOrderChildByQuoteId(sysMakeOrder.getSaleNo());
return getDataTable(list);
}
/**
* 修改开发修改单
*/
@ -190,4 +221,8 @@ public class ErpDevelopModifyorderController extends BaseController
return toAjax(erpDevelopModifyorderService.restoreErpDevelopModifyorderById(id));
}
}

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

@ -68,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where>
order by a.id desc
</select>
<select id="selectSysSalesOrderChildById" parameterType="Long" resultMap="SysSalesOrderChildResult">
<include refid="selectSysSalesOrderChild"/>
where a.id = #{id}

539
ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html

@ -9,34 +9,19 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-developModifyOrder-add">
<div class="form-group" hidden="hidden">
<label class="col-sm-3 control-label">开发修改单号:</label>
<div class="form-group">
<label class="col-sm-4 control-label is-required">生产单号:</label>
<div class="col-sm-8">
<input name="developOderCode" class="form-control" type="text">
<select class="form-control" id="makeNo" name="makeNo" required>
<!-- 这里动态生成生产单号选项 -->
</select>
</div>
</div>
<div class="container">
<div class="header">
<div class="btn-group-sm" role="group">
<header>修改开发修改单:</header>
</div>
</div>
<div class="row">
<div class="form-group">
<label class="col-sm-3 control-label is-required">生产单号:</label>
<div class="col-sm-8">
<select id="makeNo" name="makeNo" class="form-control" type="text" required>
<option value="">请选择</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">修改完成时间:</label>
<div class="input-group date">
<input name="updateInfoTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-5 control-label is-required">修改完成时间:</label>
<div class="col-sm-7 input-group date">
<input name="updateFinishTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
</form>
@ -44,14 +29,14 @@
<div class="form-row">
<div class="btn-group-sm" role="group">
<span>选择开发修改单物料</span>
<a class="btn btn-success" onclick="insertRow()">
<a class="btn btn-success" onclick="insertDevelopModify()">
<i class="fa fa-plus"></i> 添加修改物料
</a>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-developModify"></table>
<table id="bootstrap-table-developModify"></table>
</div>
</div>
</div>
@ -59,14 +44,14 @@
<div class="form-row">
<div class="btn-group-sm" role="group">
<span>选择采购物料</span>
<a class="btn btn-success" onclick="insertRow2()">
<a class="btn btn-success" onclick="insertPurchase()">
<i class="fa fa-plus"></i> 添加修改物料
</a>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-material"></table>
<table id="bootstrap-table-purchase"></table>
</div>
</div>
</div>
@ -74,14 +59,14 @@
<div class="form-row">
<div class="btn-group-sm" role="group">
<span>选择通知人</span>
<a class="btn btn-success" onclick="insertRow3()">
<a class="btn btn-success" onclick="insertBiztoitem()">
<i class="fa fa-plus"></i> 添加通知人
</a>
</div>
</div>
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-biztoitem"></table>
<table id="bootstrap-table-biztoitem"></table>
</div>
</div>
</div>
@ -99,461 +84,139 @@
var userName = [[${@permission.getPrincipalProperty('userName')}]];
$("#form-developModifyOrder-add").validate({ focusCleanup: true});
$(function () {
$("#makeNo").select2({
theme: "bootstrap",
allowClear: true,
placeholder: "请选择生产单号",
ajax: {
url: ctx + "/system/makeorder/getAllMakeNos",
dataType: 'json',
type: "POST",
delay: 250,
processResults: function (res, params) {
var options = [];
if(res.code==0){
var resultList = res.data;
console.log(resultList);
for(var i= 0, len=resultList.length;i<len;i++){
var option = resultList[i];
option.id = resultList[i]["makeNo"];
option.text = resultList[i]["makeNo"];
options.push(option);
}
}
return {
results: options
};
/*加载所有的关联生产单号*/
loadAllMakeNos();
/*加载所有的关联生产单号*/
function loadAllMakeNos(){
var url = ctx + 'system/makeorder/getAllMakeNos';
$.ajax({
type:'GET',//请求类型
url:url,//后端接口url
dataType:'json', //预期服务器返回数据类型
success: function (data){
if (data && Array.isArray(data)){
var selectElement = $('#makeNo'); //获取生产编号下拉框元素
//清空下拉框现有选项
selectElement.empty();
// 添加默认选项(如果需要)
selectElement.append('<option value="">请选择关联生产单号</option>');
//遍历返回的数据,添加下拉框的选项
$.each(data,function (index,item){
//赋值遍历数据中的makeNo到下拉框中
selectElement.append('<option value="'+item.makeNo+'">'+item.makeNo+'</option>');
})
}else {
$.modal.error("数据为空");
}
}
});
var options = {
id: "bootstrap-sub-table-developModify",
// url: prefix + "/getDevelopModifyOrderList",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
columns: [
{checkbox: true},
{field: 'index',align: 'center', title: "序号",
formatter: function (value, row, index) {
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
return columnIndex + $.table.serialNumber(index);
}
},
{title: '物料索引id',field: 'materialId',align: 'center',visible: false},
{title: '料号',field: 'materialCode',align: 'center'},
{title: '物料名称',field: 'materialName',align: 'center'},
{title: '图片',field: 'photoUrl',
formatter: function(value, row, index) {
if(value == null || value == ""){
value = "";
return "<img src='' herf='' />";
}
return $.table.imageView(value);
}
},
{title: '物料类型',field: 'materialType',align: 'center',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{ title: '描述',field: 'describe',align: 'center'},
{title: '品牌',field: 'brand',align: 'center'},
{ title: '单位',field: 'unit',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(sysUnitClassDatas, value);
}
},
{title: '半成品类型',field: 'processMethod',align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{ title: '对外售价',field: 'materialSole',},
{title: '国内税率',field: 'countTax',align: 'center',},
{ title: '美元汇率',field: 'usdTax', align: 'center',},
{field: 'materialNum',align: 'center',title: '物料的数量',},
{ title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',},
{title: '物料的不含税单价(美元)',field: 'materialNoUsd',align: 'center',},
{title: '修改详情',align: 'center',
formatter:function formatterForm(value, row, index) {
// 这里的代码会为每行生成一个表单
var form = $('<form></form>').append(
$('<input/>', { type: 'text', value: row.name, name: 'name', placeholder: 'Name' }),
$('<input/>', { type: 'email', value: row.email, name: 'email', placeholder: 'Email' }),
$('<button/>', { type: 'submit' }).text('Submit')
);
form.on('submit', function(e) {
e.preventDefault(); // 阻止表单默认提交行为
var formData = form.serializeArray(); // 序列化表单数据为数组
console.log(formData); // 在控制台输出表单数据
// 这里可以添加代码处理表单提交,例如发送到服务器等
});
return form; // 返回生成的表单HTML
}},
]
};
$.table.init(options);
})
}
var option1 = {
id: "bootstrap-sub-table-material",
// url: prefix + "/list",
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
modalName: "bom",
detailView: true,
height: $(window).height() - 100,
//指定父id列
onExpandRow : function(index, row, $detail) {
$detail.html('<table class="table-container" id="all_level_table_'+row.id+'"></table>').find('table');
// 多阶
initAllLevelTable(index,row,$detail);
// $.table.bootstrapTable('resetView');
},
columns: [
{checkbox: false},
{title: 'bom号',field: 'bomNo', },
{title: '关联料号',field: 'materialNo', },
{field: 'photoUrl',title: '图片',formatter: function(value, row, index) {return $.table.imageView(value);}},
{title: '物料名称',field: 'materialName', },
{field: 'materialType',title: '物料类型',formatter: function(value, row, index) { return $.table.selectCategoryLabel(materialTypeDatas, value);}},
{field: 'processMethod', title: '半成品类型',formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}},
{field: 'unit',title: '单位',},
{ title: '品牌',field: 'brand', },
{title: '描述',field: 'describe'},
{field: 'num',title: '订单数量',},
{field: 'parentId',title: '父级id',visible:false},
{title: '操作',align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="remove(\'' + row.id + '\')"><i class="fa fa-eye"></i> 删除</a> ');
return actions.join('');
}
}]
// 点击选择物料按钮
function insertDevelopModify() {
var selectedMakeNo = $("#makeNo").val();
if (!selectedMakeNo) {
$.modal.alertWarning("请先选择生产单号。");
return;
}
var encodedMakeNo = encodeURIComponent(selectedMakeNo);
var url = prefix + '/developModifyMaterialSelect?makeNo=' + encodedMakeNo;
var options = {
title: '选择物料',
url: url,
callBack: developModifyDoSubmit
};
$.table.init(option1);
$.modal.openOptions(options);
}
var option2 = {
id: "bootstrap-sub-table-biztoitem",
// url: prefix + "/list",
//物料信息展示列表
$(function() {
var options = {
id:'bootstrap-table-developModify',
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
modalName: "通知人",
detailView: true,
height: $(window).height() - 100,
//指定父id列
columns: [
{checkbox: false},
{title: '通知人',field: 'item', },
{title: '确认时间',field: 'materialNo', },
{title: '操作',align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="remove(\'' + row.id + '\')"><i class="fa fa-eye"></i> 删除</a> ');
return actions.join('');
}
}]
};
$.table.init(option2);
});
initAllLevelTable = function(index, row, $detail) {
$("#"+"all_level_table_"+row.id).bootstrapTable({
// url: prefix + "/allLevelList",
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
queryParams : {
parentId: row.id
},
pagination: false, // 设置不分页
modalName: "选择物料",
columns: [{
field: 'id',
title: '主键id'
checkbox: true
},
{
field: 'level',
title: '层级',
formatter: function(value, row, index) {
return $.table.selectDictLabel(levelDatas, value);
}
},
{
field: 'bomNo',
title: 'bom号',
formatter:function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
title: '料号',
field: 'materialNo',
},
{
field: 'photoUrl',
title: '图片',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{
field: 'materialNo',
title: '料号',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
field: 'materialPhotourl',
},
{
field: 'materialName',
title: '物料名称',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
field: 'materialName',
},
{
field: 'materialType',
title: '物料类型',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{
field: 'describe',
title: '描述',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
field: 'materialType',
},
{
field: 'brand',
title: '品牌',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
field: 'materialBrand',
},
{
field: 'unit',
title: '单位',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'useNum',
title: '用量',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
title: '描述',
field: 'materialDescribe',
},
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return "/";
}
return value + "%";
}
title: '单位',
field: 'materialUnit',
},
{
field: 'processMethod',
title: '半成品类型',
title: '操作',
align: 'center',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
var actions = [];
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="removeDevelopModify(\'' + row.materialNo + '\')"><i class="fa fa-remove"></i>删除</a> ');
return actions.join('');
}
},
{
field: 'parentId',
title: '父级id',
visible: false,
},
{
field: 'sortNo',
title: '排序',
visible: false
}]
});
};
initChildSonTable = function(index, row, $detail) {
var childSonTable = $detail.html('<table style="table-layout:fixed"></table>').find('table');
$(childSonTable).bootstrapTable({
// url: prefix + "/subList",
method: 'post',
detailView: true,
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
queryParams : {parentId: row.id},
onExpandRow : function(index, row, $detail) {initChildSonTable(index, row, $detail);},
columns: [
{field: 'id',title: '主键id'},
{field: 'level',title: '层级',formatter: function(value, row, index) {return $.table.selectDictLabel(levelDatas, value);}},
{field: 'bomNo',title: 'bom号',formatter:function (value,row,index){if (value == null || value == ''){return '/'; }else{ return value;}}},
{field: 'photoUrl',title: '图片',formatter:function (value,row,index){if (value == null || value == ''){ return '/';}else{return $.table.imageView(value);}}},
{field: 'materialNo',title: '料号',},
{field: 'materialName',title: '物料名称',},
{field: 'materialType',title: '物料类型',formatter: function(value, row, index) {return $.table.selectCategoryLabel(materialTypeDatas, value);}},
{field: 'describe',title: '描述',},
{field: 'brand',title: '品牌',},
{field: 'unit',title: '单位',},
{field: 'lossRate',title: '损耗率(%)',formatter:function (value,row,index){return value + '%';}},
{field: 'processMethod',title: '半成品类型',formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}},
{field: 'useNum',title: '订单用量',},
{field: 'parentId',title: '父级id',visible: false,},
}
]
});
}
function insertRow() {
var url = ctx + "system/makeorder/selectMakeorder";
var options = {
title: '选择生产物料',
url: url,
data:{makeNo:$("#makeNo").val()},
callBack: doSubmit
};
$.modal.openOptions(options);
}
function insertRow2() {
var url = ctx + "erp/material/select";
var options = {
title: '选择料号',
url: url,
callBack: doSubmit2
};
$.modal.openOptions(options);
}
function doSubmit(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0];
var totalNum = $("#bootstrap-sub-table-developModify").bootstrapTable('getData').length;
console.log("rowData: "+rowData);
$("#bootstrap-sub-table-developModify").bootstrapTable('insertRow',{
index: 1,
row: {
id:rowData.id,
bomNo:rowData.bomNo,
materialNo: rowData.materialNo,
materialName: rowData.materialName,
materialType: rowData.materialType,
describe: rowData.describe,
processMethod: rowData.processMethod,
unit: rowData.unit,
brand: rowData.brand,
level: "1",
lossRate:'',
useNum:''
}
})
layer.close(index);
}
function doSubmit2(index, layero,uniqueId){
$.table.init(options);
})
function developModifyDoSubmit(index, layero,uniqueId){
console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0];
var totalNum = $("#bootstrap-sub-table-material").bootstrapTable('getData').length;
var rowData = iframeWin.$('#bootstrap-developModifyMaterialSelect-table').bootstrapTable('getSelections')[0];
console.log("rowData: "+rowData);
$("#bootstrap-sub-table-material").bootstrapTable('insertRow',{
index: 1,
$("#bootstrap-table-developModify").bootstrapTable('insertRow', {
index:1,
row: {
id:rowData.id,
bomNo:rowData.bomNo,
materialNo: rowData.materialNo,
materialNo:rowData.materialNo,
materialPhotourl:rowData.materialPhotourl,
materialName: rowData.materialName,
materialType: rowData.materialType,
describe: rowData.describe,
processMethod: rowData.processMethod,
unit: rowData.unit,
brand: rowData.brand,
level: "1",
lossRate:'',
useNum:''
materialDescribe: rowData.materialDescribe,
materialBrand: rowData.materialBrand,
materialUnit: rowData.materialUnit,
materialProcessMethod: rowData.materialProcessMethod,
}
})
layer.close(index);
}
function remove(id){
$("#bootstrap-sub-table-developModify").bootstrapTable('remove', {
field: 'id',
values: id
})
}
function removeRow(id){
$("#bootstrap-sub-table-material").bootstrapTable('remove', {
field: 'id',
values: id
// 逻辑删除前端的一行数据
function removeDevelopModify(materialNo){
$("#bootstrap-table-developModify").bootstrapTable('remove', {
field: 'materialNo',
values: materialNo
})
}
function submitHandler() {
if ($.validate.form()) {
var from = $("#form-developModifyOrder-add").serializeArray();
var developModify = $("#bootstrap-sub-table-developModify").bootstrapTable('getData');
var material = $("#bootstrap-sub-table-material").bootstrapTable('getData');
for (var i = 0; i < developModify.length; i++) {
from.push({"name": "developModify[" + i + "].id", "value": developModify[i].id});
from.push({"name": "developModify[" + i + "].bomNo", "value": developModify[i].bomNo});
from.push({"name": "developModify[" + i + "].materialNo", "value": developModify[i].materialNo});
from.push({"name": "developModify[" + i + "].materialName", "value": developModify[i].materialName});
from.push({"name": "developModify[" + i + "].materialType", "value": developModify[i].materialType});
from.push({"name": "developModify[" + i + "].describe", "value": developModify[i].describe});
from.push({"name": "developModify[" + i + "].processMethod", "value": developModify[i].processMethod});
from.push({"name": "developModify[" + i + "].unit", "value": developModify[i].unit});
from.push({"name": "developModify[" + i + "].brand", "value": developModify[i].brand});
from.push({"name": "developModify[" + i + "].level", "value": developModify[i].level});
from.push({"name": "developModify[" + i + "].lossRate", "value": developModify[i].lossRate});
from.push({"name": "developModify[" + i + "].useNum", "value": developModify[i].useNum});
}
for (var i = 0; i < material.length; i++) {
from.push({"name": "material[" + i + "].id", "value": material[i].id});
from.push({"name": "material[" + i + "].bomNo", "value": material[i].bomNo});
from.push({"name": "material[" + i + "].materialNo", "value": material[i].materialNo});
from.push({"name": "material[" + i + "].materialName", "value": material[i].materialName});
from.push({"name": "material[" + i + "].materialType", "value": material[i].materialType});
from.push({"name": "material[" + i + "].describe", "value": material[i].describe});
from.push({"name": "material[" + i + "].processMethod", "value": material[i].processMethod});
from.push({"name": "material[" + i + "].unit", "value": material[i].unit});
from.push({"name": "material[" + i + "].brand", "value": material[i].brand});
from.push({"name": "material[" + i + "].level", "value": material[i].level});
from.push({"name": "material[" + i + "].lossRate", "value": material[i].lossRate});
from.push({"name": "material[" + i + "].useNum", "value": material[i].useNum});
}
$("#developModify").val(JSON.stringify(developModify));
$("#material").val(JSON.stringify(material));
$("#developModifyOrder").val(JSON.stringify(from));
$("#material").val(JSON.stringify(material));
}
}
</script>
</body>
</html>

76
ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/developModifyOrderMaterialSelect.html

@ -0,0 +1,76 @@
<!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-developModifyMaterialSelect-table"></table>
</div>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "erp/developModifyOrder";
// 从后端拿到传入的makeNo
var makeNo = /*[[${makeNo}]]*/ '';
$(function() {
var options = {
id: 'bootstrap-developModifyMaterialSelect-table',
showSearch: false,
showRefresh: false,
showToggle: false,
clickToSelect: true, // 点击选中行
singleSelect: true, // 单选
url: prefix + "/getMaterialListByMakeNo",
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',
},
]
};
$.table.init(options);
});
function queryParams(params) {
var curParams = {
// 现在使用从Thymeleaf传过来的makeNo
makeNo: makeNo
};
return curParams;
}
</script>
</body>
</html>
Loading…
Cancel
Save