Browse Source

[feat]生产管理:修改新增生产委内入库单新增页面,新增查询销售订单类型查询,新增生产委内入库对象,新增入库委内加工单报价。

dev
zhangsiqi 5 months ago
parent
commit
421f06fcc1
  1. 13
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java
  2. 11
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeOrder.java
  3. 347
      ruoyi-admin/src/main/resources/templates/erp/inboundOrder/add.html
  4. 108
      ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html
  5. 240
      ruoyi-admin/src/main/resources/templates/system/makeorder/addProcessInbound.html
  6. 8
      ruoyi-admin/src/main/resources/templates/system/makeorder/addpick.html

13
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysMakeOrderController.java

@ -9,10 +9,12 @@ import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.erp.service.IErpMaterialService;
import com.ruoyi.system.domain.SysMakeOrder;
import com.ruoyi.system.domain.SysMakeorderDept;
import com.ruoyi.system.domain.SysSalesOrder;
import com.ruoyi.system.domain.SysSalesOrderChild;
import com.ruoyi.system.dto.SysEquipMaterialDto;
import com.ruoyi.system.dto.SysMakeorderDeptDto;
@ -52,6 +54,9 @@ public class SysMakeOrderController extends BaseController
@Autowired
private ISysSalesOrderChildService salesOrderChildService;
@Autowired
private ISysSalesOrderService salesOrderService;
@GetMapping("/test")
public AjaxResult test(){
sysMakeOrderService.generateMakeOrderBySalesOrderCode("XS20240411007");
@ -108,6 +113,10 @@ public class SysMakeOrderController extends BaseController
{
mmap.put("currentUser", ShiroUtils.getSysUser());
SysMakeOrder sysMakeOrder = sysMakeOrderService.selectSysMakeOrderById(id);
SysSalesOrder sysSalesOrder = salesOrderService.selectSysSalesOrderBySalesOrderCode(sysMakeOrder.getSaleNo());
if(StringUtils.isNotNull(sysSalesOrder)){
sysMakeOrder.setOrderType(sysSalesOrder.getSalesOrderType());
}
mmap.put("sysMakeOrder", sysMakeOrder);
return prefix + "/addPick";
}
@ -120,6 +129,10 @@ public class SysMakeOrderController extends BaseController
{
mmap.put("currentUser", ShiroUtils.getSysUser());
SysMakeOrder sysMakeOrder = sysMakeOrderService.selectSysMakeOrderById(id);
SysSalesOrder sysSalesOrder = salesOrderService.selectSysSalesOrderBySalesOrderCode(sysMakeOrder.getSaleNo());
if(StringUtils.isNotNull(sysSalesOrder)){
sysMakeOrder.setOrderType(sysSalesOrder.getSalesOrderType());
}
mmap.put("sysMakeOrder", sysMakeOrder);
return prefix + "/addProcessInbound";
}

11
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysMakeOrder.java

@ -42,6 +42,8 @@ public class SysMakeOrder extends BaseEntity
@Excel(name = "关联销售订单号")
private String saleNo;
@Excel(name = "订单类型")
private String orderType;
/** 业务员 */
@Excel(name = "业务员")
private String Salesman;
@ -158,6 +160,15 @@ public class SysMakeOrder extends BaseEntity
this.Salesman = Salesman;
}
public String getOrderType() {
return orderType;
}
public void setOrderType(String orderType) {
this.orderType = orderType;
}
public String getSalesman()
{
return Salesman;

347
ruoyi-admin/src/main/resources/templates/erp/inboundOrder/add.html

@ -6,18 +6,6 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-inboundOrder-add">
<div class="form-group">
<label class="col-sm-3 control-label">删除标志:</label>
<div class="col-sm-8">
<input name="delFlag" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">备注:</label>
<div class="col-sm-8">
<textarea name="remark" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">生产订单号:</label>
<div class="col-sm-8">
@ -31,38 +19,337 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库单号:</label>
<div class="col-sm-8">
<input name="inboundOrderNo" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库状态:</label>
<label class="col-sm-3 control-label">业务员:</label>
<div class="col-sm-8">
<select name="inboundStatus" class="form-control m-b" th:with="type=${@dict.getType('erp_inbound_status')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
<input name="businessMembers" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库类型:</label>
<label class="col-sm-3 control-label">订单类型:</label>
<div class="col-sm-8">
<select name="inboundType" class="form-control m-b" th:with="type=${@dict.getType('erp_inbound_type')}">
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">入库数:</label>
<div class="col-sm-8">
<input name="inboundNum" class="form-control" type="text">
</div>
</div>
</form>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-1"></table>
</div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "erp/inboundOrder"
var editFlag = [[${@permission.hasPermi('erp:inboundOrder:edit')}]];
var removeFlag = [[${@permission.hasPermi('erp:inboundOrder:remove')}]];
var cancelFlag = [[${@permission.hasPermi('erp:inboundOrder:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('erp:inboundOrder:restore')}]];
var inboundStatusDatas = [[${@dict.getType('erp_inbound_status')}]];
var inboundTypeDatas = [[${@dict.getType('erp_inbound_type')}]];
var prefix = ctx + "erp/inboundOrder";
// 字典
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var levelDatas = [[${@dict.getType('bomLevel')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
// var subTableFormArray = [];
$(function(){
var options = {
url: ctx + "system/orderChild/list",
id: 'bootstrap-sub-table-1',
showSearch: false,
showRefresh: false,
showToggle: false,
showColumns: false,
uniqueId: "id",
pagination: false, // 设置不分页
sidePagination: "client",
queryParams: queryParams,
detailView: true,
onExpandRow : function(index, row, $detail) {
initChildTable(index, row, $detail);
},
/*onCollapseRow: function(index, row){
var childTableFormId = 'child_table_form_'+index;
var formData = $('#'+childTableFormId).serialize();
var formObj = $.common.formDataToObj(formData);
subTableFormArray.push(formObj);
},*/
columns: [
{
field: 'id',
title: '主键id',
visible: false
},
{
field: 'quoteId',
title: '关联销售订单编号',
visible: false
},
{
field: 'bomId',
title: 'bom主键Id',
visible: false
},
{
field: 'materialCode',
align: 'center',
title: '料号'
},
{
field: 'materialName',
align: 'center',
title: '物料名称',
},
{
field: 'materialType',
align: 'center',
title: '物料类型',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{
field: 'unit',
align: 'center',
title: '单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(sysUnitClassDatas, value);
}
},
{
field: 'brand',
align: 'center',
title: '品牌'
},
{
field: 'describe',
align: 'center',
title: '描述'
},
{
field: 'processMethod',
align: 'center',
title: '半成品类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{
field: 'deliveryTime',
align: 'center',
title: '客户期望交付时间'
},
{
field: 'materialNum',
align: 'center',
title: '订单数量'
}
]
};
$.table.init(options);
})
initChildTable = function(index, row, $detail) {
var parentRow = row;
var parentRowIndex = index;
var childTableId = 'child_table_'+index;
var childFormTableId = 'child_form_table_'+index;
var childTableFormId = 'child_table_form_'+index;
// $detail.html('<form id="'+childTableFormId+'"><table id="'+childTableId+'"></table><table id="'+childFormTableId+'"></table></form>');
$detail.html('<table id="'+childTableId+'"></table>');
// BOM展示
$('#'+childTableId).bootstrapTable({
url: ctx + "erp/inboundOrderDetail/processDetaillist",
method: 'post',
sidePagination: "server",
contentType: "application/x-www-form-urlencoded",
queryParams : {
inboundOrderNo: $("#inboundOrderNo").val(),
saleNo: $("#saleNo").val(),
salesOrderMaterialNo: parentRow.materialCode
},
columns: [{
field: 'id',
title: '主键id',
visible: false
},
{
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: 'materialNo',
title: '料号',
formatter: function (value,row,index){
var curIndex = row.sortNo-1;
return '<input readonly class = "form-control" data-id = "materialNo_'+curIndex+'" name="inboundDetails['+curIndex+'].materialNo" value="'+value+'">' +
'<input class = "hidden form-control" data-id = "makeorderBomId_'+curIndex+'" name="inboundDetails['+curIndex+'].makeorderBomId" value="'+row.id+'">';
}
},
{
field: 'photoUrl',
title: '图片',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{
field: 'materialName',
title: '物料名称',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
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: 'brand',
title: '品牌',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'unit',
title: '单位',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'processMethod',
title: '半成品类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{
field: 'useNum',
title: '用量',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value + "%";
}
}
},
{
field: 'materialNum',
title: '订单用量',
formatter: function (value,row,index){
return parentRow.materialNum * row.useNum;
}
},
{
field: 'completedNum',
title: '已完成数'
},
{
field: 'currentNum',
title: '本次委内完成数量'
},
{
field: 'processFeeUnitPrice',
title: '委内加工费单价'
},
{
field: 'makeNo',
title: '生产订单号',
visible: false,
},
{
field: 'salesOrderCode',
title: '销售订单号',
visible: false,
},
{
field: 'salesOrderMaterialNo',
title: '销售订单料号',
visible: false,
},
{
field: 'sortNo',
title: '排序',
visible: false
}],
// 当所有数据被加载时触发
onLoadSuccess: function(data) {
},
});
};
function queryParams(params) {
var curParams = {
// 传递参数查询参数
// pageSize: params.limit,
// pageNum: params.offset / params.limit + 1,
// searchValue: params.search,
// orderByColumn: params.sort,
// isAsc: params.order
};
// 额外传参
curParams.quoteId = $("#saleNo").val();
return curParams;
}
$("#form-inboundOrder-add").validate({
focusCleanup: true
});

108
ruoyi-admin/src/main/resources/templates/erp/inboundOrder/inboundOrder.html

@ -15,14 +15,31 @@
<input type="text" name="inboundOrderNo"/>
</li>
<li>
<label>关联生单号:</label>
<label>关联生单号:</label>
<input type="text" name="makeNo"/>
</li>
<li>
<label>关联销售订单号:</label>
<input type="text" name="saleNo"/>
<label>客户ID:</label>
<input type="text" name="customerCode"/>
</li>
<li>
<label>客户公司名称:</label>
<input type="text" name="customerCompanyName"/>
</li>
<li>
<label>生产状态:</label>
<select name="inboundType" th:with="type=${@dict.getType('sys_erp_makeStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>使用状态:</label>
<select name="useStatus" th:with="type=${@dict.getType('useStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>入库状态:</label>
<select name="inboundStatus" th:with="type=${@dict.getType('erp_inbound_status')}">
@ -31,12 +48,25 @@
</select>
</li>
<li>
<label>入库类型</label>
<select name="inboundType" th:with="type=${@dict.getType('erp_inbound_type')}">
<label>品质状态</label>
<select name="qualityStatus" th:with="type=${@dict.getType('qualityStatus')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>品质状态:</label>
<select name="orderType" th:with="type=${@dict.getType('sys_order_type')}">
<option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li class="select-time">
<label>录入时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
@ -55,10 +85,10 @@
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="erp:inboundOrder:remove">
<i class="fa fa-remove"></i> 删除
</a>
</a> -->
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="erp:inboundOrder:export">
<i class="fa fa-download"></i> 导出
</a>-->
</a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
@ -86,48 +116,39 @@
restoreUrl: prefix + "/restore/{id}",
exportUrl: prefix + "/export",
modalName: "入库单",
columns: [{
checkbox: true
},
{
title: '主键ID',
field: 'id',
visible: false
},
{
title: '生产订单号',
field: 'makeNo',
},
{
title: '关联销售订单号',
field: 'saleNo',
},
{
title: '入库单号',
field: 'inboundOrderNo',
},
{
title: '入库状态',
field: 'inboundStatus',
columns: [
{checkbox: true},
{title: '主键ID',field: 'id',visible: false},
{title: '品质单号',field: ''},
{title: '品质状态',field: '',},
{title: '入库状态',field: 'inboundStatus',
formatter: function(value, row, index) {
return $.table.selectDictLabel(inboundStatusDatas, value);
}
},
{
title: '入库类型',
field: 'inboundType',
{title: '入库单号',field: 'inboundOrderNo',},
{title: '关联生产订单号',field: 'makeNo',},
{title: '关联销售订单号',field: 'saleNo',visible: false,},
{title: '生产订单类型',field: '',},
{title: '入库类型',field: 'inboundType',
formatter: function(value, row, index) {
return $.table.selectDictLabel(inboundTypeDatas, value);
}
},
{
title: '入库数',
field: 'inboundNum',
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
{title: '客户ID',field: '',},
{title: '客户公司名称',field: '',},
{title: '客户订单号',field: '',},
{title: '物料合计',field: '',},
{title: '数量合计',field: '',},
{title: '委内加工费总价',field: '',},
{title: '品质合格数',field: '',},
{title: '品项不合格数',field: '',},
{title: '入库数',field: 'inboundNum',},
{title: '录入人',field: 'inboundUser',},
{title: '录入时间',field: 'inboundTime',},
{title: '更新人',field: '',},
{title: '上次更新时间',field: '',},
{title: '操作', align: 'center',formatter: function(value, row, index) {
var actions = [];
/*actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a> ');
@ -139,7 +160,8 @@
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-edit"></i>详情</a> ');
return actions.join('');
}
}]
}
]
};
$.table.init(options);
});

240
ruoyi-admin/src/main/resources/templates/system/makeorder/addProcessInbound.html

@ -29,20 +29,20 @@
<div class="form-group">
<label class="col-sm-3 control-label is-required">订单类型:</label>
<div class="col-sm-8">
<select disabled name="salesOrderType" class="form-control" type="text" th:with="dictList=${@dict.getType('sys_order_type')}" required>
<select disabled name="orderType" class="form-control" th:with="dictList=${@dict.getType('sys_order_type')}" th:field="*{orderType}" required>
<option value="">请选择</option>
<option th:each="dict : ${dictList}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
</select>
</div>
</div>
</form>
<div class="container">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-1"></table>
</div>
</div>
</form>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
@ -77,82 +77,31 @@
onExpandRow : function(index, row, $detail) {
initChildTable(index, row, $detail);
},
/*onCollapseRow: function(index, row){
var childTableFormId = 'child_table_form_'+index;
var formData = $('#'+childTableFormId).serialize();
var formObj = $.common.formDataToObj(formData);
subTableFormArray.push(formObj);
},*/
columns: [
{
field: 'id',
title: '主键id',
visible: false
},
{
field: 'quoteId',
title: '关联销售订单编号',
visible: false
},
{
field: 'bomId',
title: 'bom主键Id',
visible: false
},
{
field: 'materialCode',
align: 'center',
title: '料号'
},
{
field: 'materialName',
align: 'center',
title: '物料名称',
},
{
field: 'materialType',
align: 'center',
title: '物料类型',
{field: 'id',title: '主键id',visible: false},
{field: 'quoteId',title: '关联销售订单编号',visible: false},
{field: 'bomId',title: 'bom主键Id',visible: false},
{field: 'materialCode',align: 'center',title: '料号' },
{field: 'materialName',align: 'center',title: '物料名称',},
{field: 'materialType',align: 'center',title: '物料类型',
formatter: function(value, row, index) {
return $.table.selectCategoryLabel(materialTypeDatas, value);
}
},
{
field: 'unit',
align: 'center',
title: '单位',
{field: 'unit',align: 'center',title: '单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(sysUnitClassDatas, value);
}
},
{
field: 'brand',
align: 'center',
title: '品牌'
},
{
field: 'describe',
align: 'center',
title: '描述'
},
{
field: 'processMethod',
align: 'center',
title: '半成品类型',
{field: 'brand',align: 'center',title: '品牌'},
{field: 'describe',align: 'center',title: '描述'},
{field: 'processMethod',align: 'center',title: '半成品类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{
field: 'deliveryTime',
align: 'center',
title: '客户期望交付时间'
},
{
field: 'materialNum',
align: 'center',
title: '订单数量'
}
{field: 'deliveryTime',align: 'center',title: '客户期望交付时间'},
{field: 'materialNum',align: 'center',title: '订单数量'},
]
};
$.table.init(options);
@ -177,140 +126,62 @@
salesOrderCode: $("#saleNo").val(),
salesOrderMaterialNo: parentRow.materialCode
},
columns: [{
field: 'id',
title: '主键id',
visible: false
},
{
field: 'level',
title: '阶层',
columns: [
{field: 'id',title: '主键id',visible: false},
{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: 'materialNo',
title: '料号',
{field: 'bomNo',title: 'BOM号',},
{field: 'materialNo',title: '料号',
formatter: function (value,row,index){
var curIndex = row.sortNo-1;
return '<input readonly class = "form-control" data-id = "materialNo_'+curIndex+'" name="inboundDetails['+curIndex+'].materialNo" value="'+value+'">' +
'<input class = "hidden form-control" data-id = "makeorderBomId_'+curIndex+'" name="inboundDetails['+curIndex+'].makeorderBomId" value="'+row.id+'">';
}
},
{
field: 'photoUrl',
title: '图片',
{field: 'photoUrl',title: '图片',
formatter: function(value, row, index) {
return $.table.imageView(value);
}
},
{
field: 'materialName',
title: '物料名称',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'materialType',
title: '物料类型',
{field: 'materialName',title: '物料名称',},
{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: 'brand',
title: '品牌',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'unit',
title: '单位',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
}
},
{
field: 'processMethod',
title: '半成品类型',
{field: 'describe',title: '描述',},
{field: 'brand', title: '品牌',},
{field: 'unit',title: '单位',},
{field: 'processMethod',title: '半成品类型',
formatter: function(value, row, index) {
return $.table.selectDictLabel(processMethodDatas, value);
}
},
{
field: 'useNum',
title: '用量',
{field: 'useNum',title: '用量',},
{field: 'lossRate',title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
return value
}
//百分号匹配
if(value == null || value == ""){
return "/";
}
},
{
field: 'lossRate',
title: '损耗率',
formatter: function (value,row,index){
if (value == null || value == ''){
return '/';
}else{
var reg = /^[0-9]+.?[0-9]*$/;
if (!reg.test(value)){
return value + "%";
}else{
return value;
}
}
},
{
field: 'materialNum',
title: '订单用量',
{field: 'materialNum',title: '订单用量',
formatter: function (value,row,index){
return parentRow.materialNum * row.useNum;
}
},
{
field: 'completedNum',
title: '已完成数'
},
{
field: 'currentNum',
title: '本次委内完成数量',
{field: 'completedNum',title: '已完成数'},
{field: 'currentNum',title: '本次委内完成数量',
formatter: function (value,row,index){
var curIndex = row.sortNo-1;
return '<input class = "form-control" data-id = "currentNum_'+curIndex+'" name="inboundDetails['+curIndex+'].currentNum">';
@ -324,30 +195,15 @@
return '<input class = "form-control" data-id = "processFeeUnitPrice_'+curIndex+'" name="inboundDetails['+curIndex+'].processFeeUnitPrice">';
}
},
{
field: 'makeNo',
title: '生产订单号',
visible: false,
},
{
field: 'salesOrderCode',
title: '销售订单号',
visible: false,
},
{
field: 'salesOrderMaterialNo',
title: '销售订单料号',
visible: false,
},
{
field: 'sortNo',
title: '排序',
visible: false
}],
{field: 'makeNo',title: '生产订单号',visible: false,},
{field: 'salesOrderCode',title: '销售订单号', visible: false,},
{field: 'salesOrderMaterialNo',title: '销售订单料号',visible: false,},
{field: 'sortNo',title: '排序',visible: false}
],
// 当所有数据被加载时触发
onLoadSuccess: function(data) {
},
// onLoadSuccess: function(data) {
//
// },
});
};

8
ruoyi-admin/src/main/resources/templates/system/makeorder/addpick.html

@ -28,20 +28,20 @@
<div class="form-group">
<label class="col-sm-3 control-label is-required">订单类型:</label>
<div class="col-sm-8">
<select disabled name="salesOrderType" class="form-control" type="text" th:with="dictList=${@dict.getType('sys_order_type')}" required>
<select name="orderType" class="form-control" type="text" th:with="dictList=${@dict.getType('sys_order_type')}" th:field="*{orderType}" required>
<option value="">请选择</option>
<option th:each="dict : ${dictList}" th:value="${dict.dictValue}" th:text="${dict.dictLabel}"></option>
</select>
</div>
</div>
</form>
<div class="container">
<div class="row">
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-sub-table-1"></table>
</div>
</div>
</form>
</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />

Loading…
Cancel
Save