Browse Source

[feat] 工程管理

开发修改单数据库表、实体类新增工程员字段;
开发修改单前端列表页面新增下拉选择工程员进行条件筛选,新增查询工程员方法;
开发修改单新增页面新增工程员字段,设置为自动填充值,不可修改
开发修改单后端Controller新增查找所有的工程员接口
开发修改单分页查询接口,新增条件查询工程员
dev
liuxiaoxu 2 months ago
parent
commit
f0d309119e
  1. 9
      ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java
  2. 1
      ruoyi-admin/src/main/resources/mapper/erp/ErpDevelopModifyorderMapper.xml
  3. 26
      ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/add.html
  4. 24
      ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/developModifyOrder.html

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

@ -104,11 +104,12 @@ public class ErpDevelopModifyorderController extends BaseController
/**
* 查找所有的工程员
* */
@GetMapping ("/getEngineerList")
@ResponseBody
@PostMapping("/getEngineerList")
public AjaxResult getEngineerList(String roleKey){
List<SysUser> engineerList = sysUserService.getSpecificRoleList(roleKey);
return AjaxResult.success(engineerList);
public TableDataInfo getEngineerList(){
startPage();
List<SysUser> list = sysUserService.selectRoleToUserList("gcwyRole,gcjlRole,gczgRole,yfzjRole,");
return getDataTable(list);
}
/**

1
ruoyi-admin/src/main/resources/mapper/erp/ErpDevelopModifyorderMapper.xml

@ -54,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where>
<if test="developOrderCode != null and developOrderCode != ''"> and develop_order_code like concat('%', #{developOrderCode}, '%')</if>
<if test="materialNo != null and materialNo != ''"> and material_no like concat('%', #{materialNo}, '%')</if>
<if test="userName != null and userName != ''"> and user_name = #{userName}</if>
<if test="auditStatus != null and auditStatus != ''"> and audit_status = #{auditStatus}</if>
<if test="finshStatus != null and finshStatus != ''"> and finsh_status = #{finshStatus}</if>
<if test="materialName != null and materialName != ''"> and material_name like concat('%', #{materialName}, '%')</if>

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

@ -24,6 +24,12 @@
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label is-required">工程员:</label>
<div class="col-sm-8">
<input name="userName" id="userName_add" class="form-control m-b" readonly required />
</div>
</div>
</form>
<div class="container">
<div class="form-row my-5"> <!-- 添加my-4类 -->
@ -699,6 +705,26 @@
})
}
//查询工程员
// function engineer(){
// $.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='userName']").append(
// "<option value='" + usertData[i].loginName + "'>" + usertData[i].userName + "</option>");
// }
// } else {
// $.modal.msgError(res.msg);
// }
// }
// });
// }
$("#userName_add").val(loginName);
</script>
</body>
</html>

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

@ -31,7 +31,7 @@
</li>
<li>
<label>工程员:</label>
<select name="userId">
<select name="userName">
<option value="">所有</option>
</select>
</li>
@ -86,11 +86,12 @@
var processMethodDatas = [[${@dict.getType('processMethod')}]];
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var userName = [[${@permission.getPrincipalProperty('userName')}]];
var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var prefix = ctx + "erp/developModifyOrder";
$(function() {
engineer();
var options = {
url: prefix + "/list",
createUrl: prefix + "/add",
@ -291,7 +292,24 @@
$.modal.open("添加领料单",url);
}
//查询工程员
function engineer(){
$.ajax({
url: prefix + '/getEngineerList',
type: 'get',
success: function (res) {
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("select[name='userName']").append(
"<option value='" + usertData[i].loginName + "'>" + usertData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
}
});
}
</script>
</body>

Loading…
Cancel
Save