Browse Source

[feat]工程管理:修改物料信息显示排序,修改物料信息显示,物料名称改为必填项,添加物料去掉品牌必填项,添加、编辑、列表、条件搜索框去除“供应商”相关的页面信息。

dev
zhangsiqi 5 months ago
parent
commit
5dbeb0481a
  1. 6
      ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpBomImportVo.java
  2. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSupplierMapper.java
  3. 10
      ruoyi-admin/src/main/resources/templates/erp/material/add.html
  4. 23
      ruoyi-admin/src/main/resources/templates/erp/material/detail.html
  5. 37
      ruoyi-admin/src/main/resources/templates/erp/material/edit.html
  6. 27
      ruoyi-admin/src/main/resources/templates/erp/material/material.html
  7. 26
      ruoyi-admin/src/main/resources/templates/erp/material/taskGcjlVerify.html
  8. 28
      ruoyi-admin/src/main/resources/templates/erp/material/taskGczgVerify.html
  9. 38
      ruoyi-admin/src/main/resources/templates/erp/material/taskModifyApply.html
  10. 25
      ruoyi-admin/src/main/resources/templates/erp/material/taskYfzjVerify.html

6
ruoyi-admin/src/main/java/com/ruoyi/erp/domain/ErpBomImportVo.java

@ -22,7 +22,7 @@ public class ErpBomImportVo implements Serializable {
/** 损耗率 */
@Excel(name = "损耗率",sort = 3)
private BigDecimal lossRate;
private Double lossRate;
/** 备注 */
@Excel(name = "备注",sort = 4)
@ -44,11 +44,11 @@ public class ErpBomImportVo implements Serializable {
this.useNum = useNum;
}
public BigDecimal getLossRate() {
public Double getLossRate() {
return lossRate;
}
public void setLossRate(BigDecimal lossRate) {
public void setLossRate(Double lossRate) {
this.lossRate = lossRate;
}

2
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSupplierMapper.java

@ -60,7 +60,7 @@ public interface SysSupplierMapper
*/
public int deleteSysSupplierByIds(String[] supplierIds);
public List selectSysSupplierBycode();
public List<SysSupplier> selectSysSupplierBycode();
/**
* 新增物料信息的时候查关联应商信息

10
ruoyi-admin/src/main/resources/templates/erp/material/add.html

@ -46,13 +46,6 @@
</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">供应商:</label>
<div class="col-sm-8">
<select name="supplierName" class="form-control m-b">
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label ">单位:</label>
<div class="col-sm-8">
@ -170,7 +163,8 @@
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
//获取工程员
$(function(){
$("#businessMembers_add").val(userName);
$("#businessMembers_add").val(loginName);
$("#businessMembers_add").text(userName);
supplierName();
engineer();
$("#add-weiwai").hide();

23
ruoyi-admin/src/main/resources/templates/erp/material/detail.html

@ -74,8 +74,7 @@
<div class="form-group">
<label class="col-sm-3 control-label is-required">工程员:</label>
<div class="col-sm-8">
<select name="businessMembers" th:field="*{businessMembers}" id="businessMembers_edit" class="form-control m-b" disabled required >
</select>
<input name="businessMembers" th:field="*{businessMembers}" id="businessMembers_edit" class="form-control m-b" disabled required >
</div>
</div>
<div class="form-group">
@ -128,26 +127,6 @@
<script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript">
var enginner = [[${erpMaterial.businessMembers}]];
$(function(){
$.ajax({
url: ctx + 'erp/material/getEngineerList',
type: 'get',
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("#form-material-detail select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
$("#form-material-detail select[name='businessMembers']").val(enginner);
} else {
$.modal.msgError(res.msg);
}
}
});
});
new Vue({
el: '#app',
data: function() {

37
ruoyi-admin/src/main/resources/templates/erp/material/edit.html

@ -40,13 +40,6 @@
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">供应商:</label>
<div class="col-sm-8">
<select name="supplierName" class="form-control m-b" required>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">单位:</label>
<div class="col-sm-8">
@ -77,9 +70,9 @@
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">工程员:</label>
<label class="col-sm-3 control-label is-required">工程员:</label>
<div class="col-sm-8">
<select name="businessMembers" id="businessMembers_edit" class="form-control m-b" required >
<select name="businessMembers" id="businessMembers_edit" class="form-control m-b" required >
</select>
</div>
</div>
@ -111,6 +104,7 @@
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript">
var userName = [[${@permission.getPrincipalProperty('userName')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var erpMaterial = [[${erpMaterial}]];
new Vue({
el: '#app',
@ -126,7 +120,11 @@
}
},
mounted() {
// 控制下拉框选中
var materialType = $("#materialType").val();
$("#selectMaterialType").val(materialType).trigger("change");
var that = this;
// 页面渲染完成,可以执行需要的操作
console.log('页面已渲染完成');
@ -211,7 +209,7 @@
}
},
}
});
})
var prefix = ctx + "erp/material";
$("#form-material-edit").validate({
onkeyup: false,
@ -249,7 +247,6 @@
var materialType = $("#materialType").val();
$("#selectMaterialType").val(materialType);
engineer();
supplierName();
})
//获取工程员
function engineer() {
@ -264,7 +261,7 @@
engineerSelect.append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
engineerSelect.val(userName);
engineerSelect.val(erpMaterial.businessMembers);
} else {
$.modal.msgError(res.msg);
}
@ -272,22 +269,6 @@
});
}
//获取供应商
function supplierName(){
$.ajax({
url: ctx + 'system/supplier/getSupplier',
type: 'post',
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("#form-material-edit select[name='supplierName']").append(
"<option value='" + usertData[i].supplierName + "'>" + usertData[i].supplierName + "</option>");
}
$("#form-material-edit select[name='supplierName']").val(erpMaterial.supplierName);
}
}
})
}
function submitHandler() {
if ($.validate.form()) {
var materialType = $('#selectMaterialType').select2('val');

27
ruoyi-admin/src/main/resources/templates/erp/material/material.html

@ -57,13 +57,6 @@
</optgroup>
</select>
</li>
<li>
<label>供应商:</label>
<select name="supplierId" class="form-control m-b" th:with="supplierList=${@supplierItems.selectSysSupperWithMaterial()}">
<option value="">所有</option>
<option th:each="supplier:${supplierList}" th:value="${supplier.supplierId}" th:text="${supplier.supplierName}"></option>
</select>
</li>
<li class="select-time">
<label>录入时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
@ -83,7 +76,7 @@
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="erp:material:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-success" onclick="technologyTeam()" shiro:hasPermission="erp:material:item">
<a class="btn btn-success" onclick="technologyTeam()" shiro:hasRole="zjlRole">
<i class="fa fa-plus"></i> 技术团队配置
</a>
<a class="btn btn-warning" onclick="exportSelect()" shiro:hasPermission="erp:material:export">
@ -105,8 +98,8 @@
var removeFlag = [[${@permission.hasPermi('erp:material:remove')}]];
var cancelFlag = [[${@permission.hasPermi('erp:material:cancel')}]];
var restoreFlag = [[${@permission.hasPermi('erp:material:restore')}]];
var roes = [[${@permission.hasRole('zjlRole')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
// var processTypeDatas = [[${@dict.getType('processType')}]];
var useStatusDatas = [[${@dict.getType('useStatus')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var sysUnitClassDatas = [[${@dict.getType('sysUnitClassDatas')}]];
@ -132,6 +125,7 @@
detailUrl: prefix + "/detail/{id}",
pageList: [10, 25, 50],
pageSize: 10,
showColumns: false,
modalName: "物料信息",
fixedColumns: true, // 启用冻结列
fixedRightNumber: 1, // 冻结右列个数
@ -175,13 +169,12 @@
},
{title: '品牌',field: 'brand',},
{title: '描述',field: 'describe',},
{title: '利润率',field: '',visible: false,},
{title: '利润率',field: '',hidden: roes},
{title: '是否有技术团队',field: 'havaProductTem',visible: false,
formatter:function (value, row, index){return $.table.selectDictLabel(haveProductTem,value);}
},
{title: '技术团队id',field: 'productItem',visible: false,},
{title: '技术团队名称',field: 'itemName',visible: false},
{title: '供应商',field: 'supplierName',},
{title: '录入时间',field: 'createTime',},
{title: '更新人',field: 'updateBy',},
{title: '上次更新时间',field: 'updateTime',},
@ -209,18 +202,18 @@
}
// 有流程实例id
if (row.instanceId) {
// 审批历史
actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> ');
// 进度查看
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> ');
// 有待办人展示审批按钮,
if (row.todoUserId) {
var todoUserIdList = row.todoUserId.split(",");
if(todoUserIdList.includes(loginName)){
if(todoUserIdList.includes(loginName) || todoUserIdList.includes("admin")){
var nodeName = row.taskName=='驳回调整'?' 调整申请':' 审批';
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="showVerifyDialog(\'' + prefix + '\',\'' + row.taskId + '\', \'' + row.taskName+"-"+row.instanceTypeName+"申请" + '\')"><i class="fa fa-edit"></i> '+nodeName+'</a> ');
}
}
// 审批历史
actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="showHistoryDialog(\'' + row.instanceId + '\')"><i class="fa fa-list"></i> 审批历史</a> ');
// 进度查看
actions.push('<a class="btn btn-info btn-xs" href="javascript:void(0)" onclick="showProcessImgDialog(\'' + row.instanceId + '\')"><i class="fa fa-image"></i> 进度查看</a> ');
}
// 详情
actions.push('<a class="btn btn-primary btn-xs" href="javascript:void(0)" onclick="$.operate.detail(\'' + row.id + '\')"><i class="fa fa-eye"></i> 详情</a> ');
@ -256,7 +249,7 @@
var usertData = res.rows;
for (let i in usertData) {
$("select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
"<option value='" + usertData[i].loginName + "'>" + usertData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);

26
ruoyi-admin/src/main/resources/templates/erp/material/taskGcjlVerify.html

@ -50,7 +50,7 @@
<div class="form-group">
<label class="col-sm-3 control-label is-required">物料类型:</label>
<div class="col-sm-8">
<select id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" required disabled>
<select id="selectMaterialType" class="form-control m-b select2-multiple" th:with="childList=${@category.getChildByCode('materialType')}" th:field="*{materialType}" required disabled>
<optgroup>
<option value="">请选择</option>
</optgroup>
@ -101,8 +101,7 @@
<div class="form-group">
<label class="col-sm-3 control-label is-required">工程员:</label>
<div class="col-sm-8">
<select name="businessMembers" th:field="*{businessMembers}" id="businessMembers_edit" class="form-control m-b" required >
</select>
<input name="businessMembers" th:field="*{businessMembers}" id="businessMembers_edit" class="form-control m-b" required disabled>
</div>
</div>
<div class="form-group">
@ -150,7 +149,7 @@
<script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script type="text/javascript">
var erpMaterial = [[${erpMaterial}]];
var erpMaterial = [[${formData}]];
new Vue({
el: '#app',
data: function() {
@ -254,27 +253,10 @@
}
},
}
})
});
var prefix = ctx + "erp/material";
$("#form-gcjl-edit").validate({focusCleanup: true});
$(function() {
$.ajax({
url: ctx + 'erp/material/getEngineerList',
type: 'get',
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
}
});
})
function submitHandler() {
if ($.validate.form()) {
var materialType = $('#selectMaterialType').select2('val');

28
ruoyi-admin/src/main/resources/templates/erp/material/taskGczgVerify.html

@ -55,7 +55,7 @@
<option value="">请选择</option>
</optgroup>
<optgroup th:each="child: ${childList}" th:label="${child.name}">
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}"></option>
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}" th:field="*{materialType}"></option>
</optgroup>
</select>
</div>
@ -101,8 +101,7 @@
<div class="form-group">
<label class="col-sm-3 control-label">工程员:</label>
<div class="col-sm-8">
<select name="businessMembers" th:field="*{businessMembers}" id="businessMembers_edit" class="form-control m-b" required >
</select>
<input name="businessMembers" th:field="*{businessMembers}" id="businessMembers_edit" class="form-control m-b" required disabled>
</div>
</div>
<div class="form-group">
@ -160,7 +159,7 @@
getListByAttachIdUrl: ctx + "system/attach/file/getListByAttachId",
fileIdList:[],
removeFileIdList:[],
isReadOnly: true // 设置为 true 则隐藏 el-upload
}
},
mounted() {
@ -253,27 +252,10 @@
}
},
}
})
var erpMaterial = [[${erpMaterial}]];
});
var erpMaterial = [[${formData}]];
var prefix = ctx + "erp/material";
$("#form-edit").validate({focusCleanup: true});
$(function() {
$.ajax({
url: ctx + 'erp/material/getEngineerList',
type: 'get',
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
}
});
})
function submitHandler() {
if ($.validate.form()) {
var materialType = $('#selectMaterialType').select2('val');

38
ruoyi-admin/src/main/resources/templates/erp/material/taskModifyApply.html

@ -56,7 +56,7 @@
<option value="">请选择</option>
</optgroup>
<optgroup th:each="child: ${childList}" th:label="${child.name}">
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}"></option>
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}" th:field="*{materialType}"></option>
</optgroup>
</select>
</div>
@ -246,8 +246,8 @@
}
},
}
})
var erpMaterial = [[${erpMaterial}]];
});
var erpMaterial = [[${formData}]];
var prefix = ctx + "erp/material";
$("#form-edit").validate({
onkeyup: false,
@ -256,20 +256,6 @@
isInteger: true,
minlength: 10,
maxlength: 10,
// remote: {
// url: prefix + "/checkMaterialNoUnique",
// type: "post",
// dataType: "json",
// data: {
// "materialNo": function() {
// console.log($("#materialNo").val())
// return $.common.trim($("#materialNo").val());
// }
// },
// dataFilter: function(data, type) {
// return $.validate.unique(data);
// }
// }
},
},
messages: {
@ -281,24 +267,6 @@
},
focusCleanup: true
});
$(function() {
$.ajax({
url: ctx + 'erp/material/getEngineerList',
type: 'get',
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
$("select[name='businessMembers']").val(erpMaterial.businessMembers);
} else {
$.modal.msgError(res.msg);
}
}
});
})
function submitHandler() {
if ($.validate.form()) {
var materialType = $('#selectMaterialType').select2('val');

25
ruoyi-admin/src/main/resources/templates/erp/material/taskYfzjVerify.html

@ -55,7 +55,7 @@
<option value="">请选择</option>
</optgroup>
<optgroup th:each="child: ${childList}" th:label="${child.name}">
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}"></option>
<option th:each="childSon: ${child.children}" th:value="${childSon.code}" th:text="${#strings.concat(child.name,'-',childSon.name)}" th:field="*{materialType}"></option>
</optgroup>
</select>
</div>
@ -101,8 +101,7 @@
<div class="form-group">
<label class="col-sm-3 control-label is-required">工程员:</label>
<div class="col-sm-8">
<select name="businessMembers" id="businessMembers_edit" class="form-control m-b" required disabled>
</select>
<input name="businessMembers" th:field="*{businessMembers}" id="businessMembers_edit" class="form-control m-b" required disabled>
</div>
</div>
<div class="form-group">
@ -254,27 +253,9 @@
},
}
})
var erpMaterial = [[${erpMaterial}]];
var erpMaterial = [[${formData}]];
var prefix = ctx + "erp/material";
$("#form-edit").validate({focusCleanup: true});
$(function() {
$.ajax({
url: ctx + 'erp/material/getEngineerList',
type: 'get',
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
$("select[name='businessMembers']").val(erpMaterial.businessMembers);
} else {
$.modal.msgError(res.msg);
}
}
});
})
function submitHandler() {
if ($.validate.form()) {
var materialType = $('#selectMaterialType').select2('val');

Loading…
Cancel
Save