Commit 5c4edf7d94425b1fa689ff29f7800fd1ea12abbc

Authored by pengcheng
1 parent 17850353

页面修改

src/main/java/com/huaheng/pc/config/FilterConfigDetail/controller/FilterConfigDetailController.java
... ... @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
5 5 import com.baomidou.mybatisplus.core.metadata.IPage;
6 6 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
7 7 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  8 +import com.huaheng.common.exception.service.ServiceException;
8 9 import com.huaheng.common.support.Convert;
9 10 import com.huaheng.common.utils.StringUtils;
10 11 import com.huaheng.common.utils.security.ShiroUtils;
... ... @@ -17,6 +18,8 @@ import com.huaheng.framework.web.page.TableDataInfo;
17 18 import com.huaheng.framework.web.page.TableSupport;
18 19 import com.huaheng.pc.config.FilterConfigDetail.domain.FilterConfigDetail;
19 20 import com.huaheng.pc.config.FilterConfigDetail.service.FilterConfigDetailService;
  21 +import com.huaheng.pc.config.FilterConfigHeader.domain.FilterConfigHeader;
  22 +import com.huaheng.pc.config.FilterConfigHeader.service.FilterConfigHeaderService;
20 23 import io.swagger.annotations.Api;
21 24 import io.swagger.annotations.ApiOperation;
22 25 import io.swagger.annotations.ApiParam;
... ... @@ -45,6 +48,8 @@ public class FilterConfigDetailController extends BaseController {
45 48  
46 49 @Autowired
47 50 private FilterConfigDetailService filterConfigDetailService;
  51 + @Autowired
  52 + private FilterConfigHeaderService filterConfigHeaderService;
48 53  
49 54  
50 55 @RequiresPermissions("config:filterConfigDetail:view")
... ... @@ -112,6 +117,12 @@ public class FilterConfigDetailController extends BaseController {
112 117 @PostMapping("/add")
113 118 @ResponseBody
114 119 public AjaxResult addSave(FilterConfigDetail filterConfigDetail) {
  120 + FilterConfigHeader configHeader = filterConfigHeaderService.getById(filterConfigDetail.getHeaderId());
  121 + if(configHeader == null){
  122 + throw new ServiceException("找不到主表");
  123 + }
  124 + filterConfigDetail.setModuleType(configHeader.getModuleType());
  125 + filterConfigDetail.setRecordType(configHeader.getRecordType());
115 126 filterConfigDetail.setWarehouseCode(ShiroUtils.getWarehouseCode());
116 127 filterConfigDetail.setCreatedBy(ShiroUtils.getLoginName());
117 128 filterConfigDetail.setLastUpdatedBy(ShiroUtils.getLoginName());
... ...
src/main/java/com/huaheng/pc/config/FilterConfigHeader/service/FilterConfigHeaderService.java
1 1 package com.huaheng.pc.config.FilterConfigHeader.service;
2 2  
  3 +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
  4 +import com.baomidou.mybatisplus.core.toolkit.Wrappers;
3 5 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
  6 +import com.huaheng.common.utils.security.ShiroUtils;
4 7 import com.huaheng.pc.config.FilterConfigHeader.domain.FilterConfigHeader;
5 8 import com.huaheng.pc.config.FilterConfigHeader.mapper.FilterConfigHeaderMapper;
6 9 import org.springframework.stereotype.Service;
7 10  
8   -@Service
  11 +import java.util.List;
  12 +
  13 +@Service("filterConfigHeaderService")
9 14 public class FilterConfigHeaderService extends ServiceImpl<FilterConfigHeaderMapper, FilterConfigHeader> {
10 15  
  16 +
  17 + //根据模块和类型查找具体规则
  18 + public List<FilterConfigHeader> getFilterConfigHeaderService(String moduleType,String recordType){
  19 + LambdaQueryWrapper<FilterConfigHeader> lam = Wrappers.lambdaQuery();
  20 + lam.eq(FilterConfigHeader::getModuleType,moduleType)
  21 + .eq(FilterConfigHeader::getRecordType,recordType)
  22 + .eq(FilterConfigHeader::getWarehouseCode, ShiroUtils.getWarehouseCode());
  23 + return this.list(lam);
  24 + }
11 25 }
... ...
src/main/java/com/huaheng/pc/config/statusFlow/service/StatusFlowHeaderService.java
... ... @@ -2,6 +2,7 @@ package com.huaheng.pc.config.statusFlow.service;
2 2  
3 3 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4 4 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
  5 +import com.huaheng.common.utils.security.ShiroUtils;
5 6 import org.springframework.aop.aspectj.AspectJPrecedenceInformation;
6 7 import org.springframework.stereotype.Service;
7 8 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
... ... @@ -20,4 +21,13 @@ public class StatusFlowHeaderService extends ServiceImpl&lt;StatusFlowHeaderMapper,
20 21 .eq(StatusFlowHeader::getRecordType, recordType);
21 22 return this.listMaps(lambda);
22 23 }
  24 +
  25 +
  26 + //根据模块区分出入库流程
  27 + public List<StatusFlowHeader> shipmentStatusFlowHeaders(String moduleType){
  28 + LambdaQueryWrapper<StatusFlowHeader> lambda = Wrappers.lambdaQuery();
  29 + lambda.eq(StatusFlowHeader::getModuleType,moduleType)
  30 + .eq(StatusFlowHeader::getWarehouseCode, ShiroUtils.getWarehouseCode());
  31 + return this.list(lambda);
  32 + }
23 33 }
... ...
src/main/resources/templates/config/filterConfigDetail/add.html
... ... @@ -12,18 +12,18 @@
12 12 <input id="code" name="code" class="form-control" type="text">
13 13 </div>
14 14 </div>
15   - <div class="form-group">
16   - <label class="col-sm-3 control-label">模块:</label>
17   - <div class="col-sm-8">
18   - <input id="moduleType" name="moduleType" class="form-control" type="text">
19   - </div>
20   - </div>
21   - <div class="form-group">
22   - <label class="col-sm-3 control-label">类型:</label>
23   - <div class="col-sm-8">
24   - <input id="recordType" name="recordType" class="form-control" type="text">
25   - </div>
26   - </div>
  15 + <!--<div class="form-group">-->
  16 + <!--<label class="col-sm-3 control-label">模块:</label>-->
  17 + <!--<div class="col-sm-8">-->
  18 + <!--<input id="moduleType" name="moduleType" class="form-control" type="text">-->
  19 + <!--</div>-->
  20 + <!--</div>-->
  21 + <!--<div class="form-group">-->
  22 + <!--<label class="col-sm-3 control-label">类型:</label>-->
  23 + <!--<div class="col-sm-8">-->
  24 + <!--<input id="recordType" name="recordType" class="form-control" type="text">-->
  25 + <!--</div>-->
  26 + <!--</div>-->
27 27 <div class="form-group">
28 28 <label class="col-sm-3 control-label">条件名:</label>
29 29 <div class="col-sm-8">
... ... @@ -45,28 +45,24 @@
45 45 <div class="form-group">
46 46 <label class="col-sm-3 control-label">是否系统创建:</label>
47 47 <div class="col-sm-8">
48   - <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);">
49   - <input type="radio" id="systemCreated1" name="systemCreated" value="true" checked="checked"
50   - class="radio_select">
51   - <label for="systemCreated1">是</label>
52   - </div>
53   - <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);">
54   - <input type="radio" id="systemCreated2" name="systemCreated" value="false">
55   - <label for="systemCreated2">否</label>
  48 + <div class="onoffswitch">
  49 + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="systemCreated" name="systemCreated">
  50 + <label class="onoffswitch-label" for="systemCreated">
  51 + <span class="onoffswitch-inner"></span>
  52 + <span class="onoffswitch-switch"></span>
  53 + </label>
56 54 </div>
57 55 </div>
58 56 </div>
59 57 <div class="form-group">
60 58 <label class="col-sm-3 control-label">是否自定义SQL:</label>
61 59 <div class="col-sm-8">
62   - <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);">
63   - <input type="radio" id="customSql1" name="customSql" value="true" checked="checked"
64   - class="radio_select">
65   - <label for="customSql1">是</label>
66   - </div>
67   - <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);">
68   - <input type="radio" id="customSql2" name="customSql" value="false">
69   - <label for="customSql2">否</label>
  60 + <div class="onoffswitch">
  61 + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="customSql" name="customSql">
  62 + <label class="onoffswitch-label" for="customSql">
  63 + <span class="onoffswitch-inner"></span>
  64 + <span class="onoffswitch-switch"></span>
  65 + </label>
70 66 </div>
71 67 </div>
72 68 </div>
... ... @@ -86,12 +82,12 @@
86 82 code:{
87 83 required:true,
88 84 },
89   - moduleType:{
90   - required:true,
91   - },
92   - recordType:{
93   - required:true,
94   - },
  85 + // moduleType:{
  86 + // required:true,
  87 + // },
  88 + // recordType:{
  89 + // required:true,
  90 + // },
95 91 filterCode:{
96 92 required:true,
97 93 },
... ... @@ -99,6 +95,8 @@
99 95 submitHandler: function(form) {
100 96 // $.operate.save(prefix + "/add", $('#form-locationType-add').serialize());
101 97 var tableValue = $.common.getTableValue("#form-filterConfigDetail-add");
  98 + tableValue = formValueReplace(tableValue, "systemCreated", $("input[name='systemCreated']").is(':checked'));
  99 + tableValue = formValueReplace(tableValue, "customSql", $("input[name='customSql']").is(':checked'));
102 100 $.operate.save(prefix + "/add", tableValue);
103 101 }
104 102 });
... ...
src/main/resources/templates/config/filterConfigDetail/edit.html
... ... @@ -13,18 +13,18 @@
13 13 <input id="code" name="code" class="form-control" type="text" th:field="*{code}">
14 14 </div>
15 15 </div>
16   - <div class="form-group">
17   - <label class="col-sm-3 control-label">模块:</label>
18   - <div class="col-sm-8">
19   - <input id="moduleType" name="moduleType" class="form-control" type="text" th:field="*{moduleType}">
20   - </div>
21   - </div>
22   - <div class="form-group">
23   - <label class="col-sm-3 control-label">类型:</label>
24   - <div class="col-sm-8">
25   - <input id="recordType" name="recordType" class="form-control" type="text" th:field="*{recordType}">
26   - </div>
27   - </div>
  16 + <!--<div class="form-group">-->
  17 + <!--<label class="col-sm-3 control-label">模块:</label>-->
  18 + <!--<div class="col-sm-8">-->
  19 + <!--<input id="moduleType" name="moduleType" class="form-control" type="text" th:field="*{moduleType}">-->
  20 + <!--</div>-->
  21 + <!--</div>-->
  22 + <!--<div class="form-group">-->
  23 + <!--<label class="col-sm-3 control-label">类型:</label>-->
  24 + <!--<div class="col-sm-8">-->
  25 + <!--<input id="recordType" name="recordType" class="form-control" type="text" th:field="*{recordType}">-->
  26 + <!--</div>-->
  27 + <!--</div>-->
28 28 <div class="form-group">
29 29 <label class="col-sm-3 control-label">条件名:</label>
30 30 <div class="col-sm-8">
... ... @@ -46,28 +46,24 @@
46 46 <div class="form-group">
47 47 <label class="col-sm-3 control-label">是否系统创建:</label>
48 48 <div class="col-sm-8">
49   - <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);">
50   - <input type="radio" id="systemCreated1" name="systemCreated" value="true" th:field="*{systemCreated}"
51   - class="radio_select">
52   - <label for="systemCreated1">是</label>
53   - </div>
54   - <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);">
55   - <input type="radio" id="systemCreated2" name="systemCreated" value="false" th:field="*{systemCreated}">
56   - <label for="systemCreated2">否</label>
  49 + <div class="onoffswitch">
  50 + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="systemCreated" name="systemCreated">
  51 + <label class="onoffswitch-label" for="systemCreated">
  52 + <span class="onoffswitch-inner"></span>
  53 + <span class="onoffswitch-switch"></span>
  54 + </label>
57 55 </div>
58 56 </div>
59 57 </div>
60 58 <div class="form-group">
61 59 <label class="col-sm-3 control-label">是否自定义SQL:</label>
62 60 <div class="col-sm-8">
63   - <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);">
64   - <input type="radio" id="customSql1" name="customSql" value="true" th:field="*{customSql}"
65   - class="radio_select">
66   - <label for="customSql1">是</label>
67   - </div>
68   - <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);">
69   - <input type="radio" id="customSql2" name="customSql" value="false" th:field="*{customSql}">
70   - <label for="customSql2">否</label>
  61 + <div class="onoffswitch">
  62 + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="customSql" name="customSql">
  63 + <label class="onoffswitch-label" for="customSql">
  64 + <span class="onoffswitch-inner"></span>
  65 + <span class="onoffswitch-switch"></span>
  66 + </label>
71 67 </div>
72 68 </div>
73 69 </div>
... ... @@ -87,12 +83,12 @@
87 83 code:{
88 84 required:true,
89 85 },
90   - moduleType:{
91   - required:true,
92   - },
93   - recordType:{
94   - required:true,
95   - },
  86 + // moduleType:{
  87 + // required:true,
  88 + // },
  89 + // recordType:{
  90 + // required:true,
  91 + // },
96 92 filterCode:{
97 93 required:true,
98 94 },
... ... @@ -100,6 +96,8 @@
100 96 submitHandler: function(form) {
101 97 // $.operate.save(prefix + "/add", $('#form-locationType-add').serialize());
102 98 var tableValue = $.common.getTableValue("#form-filterConfigDetail-edit");
  99 + tableValue = formValueReplace(tableValue, "systemCreated", $("input[name='systemCreated']").is(':checked'));
  100 + tableValue = formValueReplace(tableValue, "customSql", $("input[name='customSql']").is(':checked'));
103 101 $.operate.save(prefix + "/edit", tableValue);
104 102 }
105 103 });
... ...
src/main/resources/templates/config/filterConfigDetail/filterConfigDetail.html
... ... @@ -22,6 +22,8 @@
22 22 var prefix = ctx + "config/filterConfigDetail";
23 23 var editFlag = [[${@permission.hasPermi('config:filterConfigDetail:edit')}]];
24 24 var removeFlag = [[${@permission.hasPermi('config:filterConfigDetail:remove')}]];
  25 + var moduleType = [[${@dict.getType('moduleType')}]];
  26 + var recordType = [[${@dict.getType('recordType')}]];
25 27 var datas = [[${@dict.getType('sys_normal_disable')}]];
26 28 var nessaryDatas = [[${@dict.getType('nessary')}]];
27 29 $(function() {
... ... @@ -63,11 +65,19 @@
63 65 },
64 66 {
65 67 field : 'moduleType',
66   - title : '模块'
  68 + title : '模块',
  69 + align : "center",
  70 + formatter: function (value, item, index) {
  71 + return $.table.selectDictLabel(moduleType, value);
  72 + }
67 73 },
68 74 {
69 75 field : 'recordType',
70   - title : '类型'
  76 + title : '类型',
  77 + align : "center",
  78 + formatter: function (value, item, index) {
  79 + return $.table.selectDictLabel(recordType, value);
  80 + }
71 81 },
72 82 {
73 83 field : 'filterCode',
... ...
src/main/resources/templates/config/filterConfigHeader/add.html
... ... @@ -9,14 +9,16 @@
9 9 <label class="col-sm-3 control-label">模块:</label>
10 10 <div class="col-sm-8">
11 11 <select class="form-control" name="moduleType" th:with="moduleType=${@dict.getType('moduleType')}">
12   - <option th:each="e : ${moduleType}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option>
  12 + <option th:each="item : ${moduleType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option>
13 13 </select>
14 14 </div>
15 15 </div>
16 16 <div class="form-group">
17 17 <label class="col-sm-3 control-label">类型:</label>
18 18 <div class="col-sm-8">
19   - <input id="recordType" name="recordType" class="form-control" type="text">
  19 + <select id="recordType" name="recordType" class="form-control" th:with="recordType=${@dict.getType('recordType')}">
  20 + <option th:each="item : ${recordType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option>
  21 + </select>
20 22 </div>
21 23 </div>
22 24 <div class="form-group">
... ... @@ -46,14 +48,12 @@
46 48 <div class="form-group">
47 49 <label class="col-sm-3 control-label">是否系统创建:</label>
48 50 <div class="col-sm-8">
49   - <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);">
50   - <input type="radio" id="systemCreated1" name="systemCreated" value="true" checked="checked"
51   - class="radio_select">
52   - <label for="systemCreated1">是</label>
53   - </div>
54   - <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);">
55   - <input type="radio" id="systemCreated2" name="systemCreated" value="false">
56   - <label for="systemCreated2">否</label>
  51 + <div class="onoffswitch">
  52 + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="systemCreated" name="systemCreated">
  53 + <label class="onoffswitch-label" for="systemCreated">
  54 + <span class="onoffswitch-inner"></span>
  55 + <span class="onoffswitch-switch"></span>
  56 + </label>
57 57 </div>
58 58 </div>
59 59 </div>
... ... @@ -83,7 +83,8 @@
83 83 submitHandler: function (form) {
84 84 // $.operate.save(prefix + "/add", $('#form-locationType-add').serialize());
85 85 var tableValue = $.common.getTableValue("#form-filterConfigHeader-add");
86   - tableValue = formValueReplace(tableValue, "moduleType", $("#moduleType option:selected").val());
  86 + // tableValue = formValueReplace(tableValue, "moduleType", $("#moduleType option:selected").val());
  87 + tableValue = formValueReplace(tableValue, "systemCreated", $("input[name='systemCreated']").is(':checked'));
87 88 $.operate.save(prefix + "/add", tableValue);
88 89 }
89 90 });
... ...
src/main/resources/templates/config/filterConfigHeader/edit.html
... ... @@ -6,20 +6,20 @@
6 6 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
7 7 <form class="form-horizontal m" id="form-filterConfigHeader-edit" th:object="${filterConfigHeader}">
8 8 <input name="id" th:field="*{id}" type="hidden">
9   - <div class="form-group">
10   - <label class="col-sm-3 control-label">模块:</label>
11   - <div class="col-sm-8">
12   - <select class="form-control" name="moduleType" th:with="moduleType=${@dict.getType('moduleType')}" th:field="*{moduleType}">
13   - <option th:each="e : ${moduleType}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option>
14   - </select>
15   - </div>
16   - </div>
17   - <div class="form-group">
18   - <label class="col-sm-3 control-label">类型:</label>
19   - <div class="col-sm-8">
20   - <input id="recordType" name="recordType" class="form-control" type="text" th:field="*{recordType}">
21   - </div>
22   - </div>
  9 + <!--<div class="form-group">-->
  10 + <!--<label class="col-sm-3 control-label">模块:</label>-->
  11 + <!--<div class="col-sm-8">-->
  12 + <!--<select class="form-control" name="moduleType" th:with="moduleType=${@dict.getType('moduleType')}" th:field="*{moduleType}">-->
  13 + <!--<option th:each="e : ${moduleType}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option>-->
  14 + <!--</select>-->
  15 + <!--</div>-->
  16 + <!--</div>-->
  17 + <!--<div class="form-group">-->
  18 + <!--<label class="col-sm-3 control-label">类型:</label>-->
  19 + <!--<div class="col-sm-8">-->
  20 + <!--<input id="recordType" name="recordType" class="form-control" type="text" th:field="*{recordType}">-->
  21 + <!--</div>-->
  22 + <!--</div>-->
23 23 <div class="form-group">
24 24 <label class="col-sm-3 control-label">条件名:</label>
25 25 <div class="col-sm-8">
... ... @@ -38,29 +38,16 @@
38 38 <input id="description" name="description" class="form-control" type="text" th:field="*{description}">
39 39 </div>
40 40 </div>
41   - <!--<div class="form-group">-->
42   - <!--<label class="col-sm-3 control-label">是否系统创建:</label>-->
43   - <!--<div class="col-sm-8">-->
44   - <!--<div class="onoffswitch">-->
45   - <!--<input type="checkbox" th:checked="${systemCreated}" class="onoffswitch-checkbox" id="systemCreated" name="systemCreated">-->
46   - <!--<label class="onoffswitch-label" for="systemCreated">-->
47   - <!--<span class="onoffswitch-inner"></span>-->
48   - <!--<span class="onoffswitch-switch"></span>-->
49   - <!--</label>-->
50   - <!--</div>-->
51   - <!--</div>-->
52   - <!--</div>-->
  41 +
53 42 <div class="form-group">
54 43 <label class="col-sm-3 control-label">是否系统创建:</label>
55 44 <div class="col-sm-8">
56   - <div class="radio radio-info radio-inline" style="transform: scale(1.1, 1.1);">
57   - <input type="radio" id="systemCreated1" name="systemCreated" value="true" th:field="*{systemCreated}"
58   - class="radio_select">
59   - <label for="systemCreated1">是</label>
60   - </div>
61   - <div class="radio radio-danger radio-inline " style="transform: scale(1.1, 1.1);">
62   - <input type="radio" id="systemCreated2" name="systemCreated" value="false" th:field="*{systemCreated}">
63   - <label for="systemCreated2">否</label>
  45 + <div class="onoffswitch">
  46 + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="systemCreated" name="systemCreated">
  47 + <label class="onoffswitch-label" for="systemCreated">
  48 + <span class="onoffswitch-inner"></span>
  49 + <span class="onoffswitch-switch"></span>
  50 + </label>
64 51 </div>
65 52 </div>
66 53 </div>
... ... @@ -92,7 +79,8 @@
92 79 },
93 80 submitHandler: function(form) {
94 81 var tableValue = $.common.getTableValue("#form-filterConfigHeader-edit");
95   - tableValue = formValueReplace(tableValue, "moduleType", $("#moduleType option:selected").val());
  82 + // tableValue = formValueReplace(tableValue, "moduleType", $("#moduleType option:selected").val());
  83 + tableValue = formValueReplace(tableValue, "systemCreated", $("input[name='systemCreated']").is(':checked'));
96 84 $.operate.save(prefix + "/edit", tableValue);
97 85 }
98 86 });
... ...
src/main/resources/templates/config/filterConfigHeader/filterConfigHeader.html
... ... @@ -75,6 +75,7 @@
75 75 var removeFlag = [[${@permission.hasPermi('config:filterConfigHeader:remove')}]];
76 76 var datas = [[${@dict.getType('sys_normal_disable')}]];
77 77 var moduleType = [[${@dict.getType('moduleType')}]];
  78 + var recordType = [[${@dict.getType('recordType')}]];
78 79 $(function() {
79 80 var options = {
80 81 url: prefix + "/list",
... ... @@ -105,7 +106,11 @@
105 106 },
106 107 {
107 108 field : 'recordType',
108   - title : '类型'
  109 + title : '类型',
  110 + align : "center",
  111 + formatter: function (value, item, index) {
  112 + return $.table.selectDictLabel(recordType, value);
  113 + }
109 114 },
110 115 {
111 116 field : 'filterCode',
... ...
src/main/resources/templates/config/shipmentPreference/add.html
... ... @@ -20,19 +20,25 @@
20 20 <div class="form-group">
21 21 <label class="col-sm-3 control-label">出库流程:</label>
22 22 <div class="col-sm-8">
23   - <input id="receiptFlow" name="shippingFlow" class="form-control" type="text">
  23 + <select id="shippingFlow" name="shippingFlow" class="form-control" th:with="shippingFlow=${@StatusFlow.shipmentStatusFlowHeaders('shipment')}">
  24 + <option th:each="item : ${shippingFlow}" th:text="${item['name']}" th:value="${item['code']}"></option>
  25 + </select>
24 26 </div>
25 27 </div>
26 28 <div class="form-group">
27 29 <label class="col-sm-3 control-label">库存分配规则:</label>
28 30 <div class="col-sm-8">
29   - <input id="allocationRule" name="allocationRule" class="form-control" type="text">
  31 + <select id="allocationRule" name="allocationRule" class="form-control" th:with="allocationRule=${@filterConfigHeaderService.getFilterConfigHeaderService('shipment','allocationRule')}">
  32 + <option th:each="item : ${allocationRule}" th:text="${item['filterName']}" th:value="${item['filterCode']}"></option>
  33 + </select>
30 34 </div>
31 35 </div>
32 36 <div class="form-group">
33 37 <label class="col-sm-3 control-label">拣货规则:</label>
34 38 <div class="col-sm-8">
35   - <input id="shipmentPickingRule" name="shipmentPickingRule" class="form-control" type="text">
  39 + <select id="shipmentPickingRule" name="shipmentPickingRule" class="form-control" th:with="shipmentPickingRule=${@filterConfigHeaderService.getFilterConfigHeaderService('shipment','shipmentPickingRule')}">
  40 + <option th:each="item : ${shipmentPickingRule}" th:text="${item['filterName']}" th:value="${item['filterCode']}"></option>
  41 + </select>
36 42 </div>
37 43 </div>
38 44 <div class="form-group">
... ...
src/main/resources/templates/config/shipmentPreference/edit.html
... ... @@ -18,24 +18,24 @@
18 18 <input id="name" name="name" class="form-control" type="text" th:field="*{name}">
19 19 </div>
20 20 </div>
21   - <div class="form-group">
22   - <label class="col-sm-3 control-label">出库流程:</label>
23   - <div class="col-sm-8">
24   - <input id="shippingFlow" name="shippingFlow" class="form-control" type="text" th:field="*{shippingFlow}">
25   - </div>
26   - </div>
27   - <div class="form-group">
28   - <label class="col-sm-3 control-label">库存分配规则:</label>
29   - <div class="col-sm-8">
30   - <input id="allocationRule" name="allocationRule" class="form-control" type="text" th:field="*{allocationRule}">
31   - </div>
32   - </div>
33   - <div class="form-group">
34   - <label class="col-sm-3 control-label">拣货规则:</label>
35   - <div class="col-sm-8">
36   - <input id="shipmentPickingRule" name="shipmentPickingRule" class="form-control" type="text" th:field="*{shipmentPickingRule}">
37   - </div>
38   - </div>
  21 + <!--<div class="form-group">-->
  22 + <!--<label class="col-sm-3 control-label">出库流程:</label>-->
  23 + <!--<div class="col-sm-8">-->
  24 + <!--<input id="shippingFlow" name="shippingFlow" class="form-control" type="text" th:field="*{shippingFlow}">-->
  25 + <!--</div>-->
  26 + <!--</div>-->
  27 + <!--<div class="form-group">-->
  28 + <!--<label class="col-sm-3 control-label">库存分配规则:</label>-->
  29 + <!--<div class="col-sm-8">-->
  30 + <!--<input id="allocationRule" name="allocationRule" class="form-control" type="text" th:field="*{allocationRule}">-->
  31 + <!--</div>-->
  32 + <!--</div>-->
  33 + <!--<div class="form-group">-->
  34 + <!--<label class="col-sm-3 control-label">拣货规则:</label>-->
  35 + <!--<div class="col-sm-8">-->
  36 + <!--<input id="shipmentPickingRule" name="shipmentPickingRule" class="form-control" type="text" th:field="*{shipmentPickingRule}">-->
  37 + <!--</div>-->
  38 + <!--</div>-->
39 39 <div class="form-group">
40 40 <label class="col-sm-3 control-label">拣货库位范围规则:</label>
41 41 <div class="col-sm-8">
... ... @@ -236,18 +236,18 @@
236 236 name:{
237 237 required: true,
238 238 },
239   - shippingFlow:{
240   - required: true,
241   - },
242   - shipmentPickingRule:{
243   - required: true,
244   - },
  239 + // shippingFlow:{
  240 + // required: true,
  241 + // },
  242 + // shipmentPickingRule:{
  243 + // required: true,
  244 + // },
245 245 shipmentPickingLocRange:{
246 246 required: true,
247 247 },
248   - allocationRule: {
249   - required: true,
250   - },
  248 + // allocationRule: {
  249 + // required: true,
  250 + // },
251 251 autoAssignLPN: {
252 252 required: true,
253 253 },
... ...
src/main/resources/templates/config/shipmentPreference/shipmentPreference.html
... ... @@ -52,7 +52,9 @@
52 52 var editFlag = [[${@permission.hasPermi('config:shipmentPreference:edit')}]];
53 53 var removeFlag = [[${@permission.hasPermi('config:shipmentPreference:remove')}]];
54 54 var prefix = ctx + "config/shipmentPreference";
55   - var datas = [[${@dict.getType('sys_normal_disable')}]];
  55 + var StatusFlow = [[${@StatusFlow.shipmentStatusFlowHeaders('shipment')}]];
  56 + var shipmentPickingRule = [[${@filterConfigHeaderService.getFilterConfigHeaderService('shipment','shipmentPickingRule')}]];
  57 + var allocationRule = [[${@filterConfigHeaderService.getFilterConfigHeaderService('shipment','allocationRule')}]];
56 58 $(function() {
57 59 var options = {
58 60 url: prefix + "/list",
... ... @@ -83,15 +85,45 @@
83 85 },
84 86 {
85 87 field : 'shippingFlow',
86   - title : '出库流程'
  88 + title : '出库流程',
  89 + formatter: function (value, item, index) {
  90 + var actions = [];
  91 + $.each(StatusFlow, function(index, dict) {
  92 + if (dict.code == value) {
  93 + actions.push("<span class='badge badge-" + dict.code + "'>" + dict.name + "</span>");
  94 + return false;
  95 + }
  96 + });
  97 + return actions.join('');
  98 + }
87 99 },
88 100 {
89 101 field : 'allocationRule',
90 102 title : '库存分配规则',
  103 + formatter: function (value, item, index) {
  104 + var actions = [];
  105 + $.each(allocationRule, function(index, dict) {
  106 + if (dict.filterCode == value) {
  107 + actions.push("<span class='badge badge-" + dict.filterCode + "'>" + dict.filterName + "</span>");
  108 + return false;
  109 + }
  110 + });
  111 + return actions.join('');
  112 + }
91 113 },
92 114 {
93 115 field : 'shipmentPickingRule',
94 116 title : '拣货规则',
  117 + formatter: function (value, item, index) {
  118 + var actions = [];
  119 + $.each(shipmentPickingRule, function(index, dict) {
  120 + if (dict.filterCode == value) {
  121 + actions.push("<span class='badge badge-" + dict.filterCode + "'>" + dict.filterName + "</span>");
  122 + return false;
  123 + }
  124 + });
  125 + return actions.join('');
  126 + }
95 127 },
96 128 {
97 129 field : 'shipmentPickingLocRange',
... ...
src/main/resources/templates/config/statusFlowHeader/add.html
... ... @@ -28,7 +28,9 @@
28 28 <div class="form-group">
29 29 <label class="col-sm-3 control-label">类型:</label>
30 30 <div class="col-sm-8">
31   - <input id="recordType" name="recordType" class="form-control" type="text">
  31 + <select id="recordType" name="recordType" class="form-control" th:with="recordType=${@dict.getType('recordType')}">
  32 + <option th:each="item : ${recordType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option>
  33 + </select>
32 34 </div>
33 35 </div>
34 36 <!--<div class="form-group">-->
... ...
src/main/resources/templates/config/statusFlowHeader/edit.html
... ... @@ -18,20 +18,20 @@
18 18 <input id="name" name="name" class="form-control" type="text" th:field="*{name}">
19 19 </div>
20 20 </div>
21   - <div class="form-group">
22   - <label class="col-sm-3 control-label">模块:</label>
23   - <div class="col-sm-8">
24   - <select id="moduleType" name="moduleType" class="form-control" th:with="moduleTyped=${@dict.getType('moduleType')}" th:field="*{moduleType}">
25   - <option th:each="item : ${moduleType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option>
26   - </select>
27   - </div>
28   - </div>
29   - <div class="form-group">
30   - <label class="col-sm-3 control-label">类型:</label>
31   - <div class="col-sm-8">
32   - <input id="recordType" name="recordType" class="form-control" type="text" th:field="*{recordType}">
33   - </div>
34   - </div>
  21 + <!--<div class="form-group">-->
  22 + <!--<label class="col-sm-3 control-label">模块:</label>-->
  23 + <!--<div class="col-sm-8">-->
  24 + <!--<select id="moduleType" name="moduleType" class="form-control" th:with="moduleTyped=${@dict.getType('moduleType')}" th:field="*{moduleType}">-->
  25 + <!--<option th:each="item : ${moduleType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option>-->
  26 + <!--</select>-->
  27 + <!--</div>-->
  28 + <!--</div>-->
  29 + <!--<div class="form-group">-->
  30 + <!--<label class="col-sm-3 control-label">类型:</label>-->
  31 + <!--<div class="col-sm-8">-->
  32 + <!--<input id="recordType" name="recordType" class="form-control" type="text" th:field="*{recordType}">-->
  33 + <!--</div>-->
  34 + <!--</div>-->
35 35 <!--<div class="form-group">-->
36 36 <!-- <label class="col-sm-3 control-label">数据版本:</label>-->
37 37 <!-- <div class="col-sm-8">-->
... ...
src/main/resources/templates/config/statusFlowHeader/statusFlowHeader.html
... ... @@ -27,7 +27,7 @@
27 27 模块:<input type="text" name="moduleType" th:value="${moduleType}"/>
28 28 </li>
29 29 <li>
30   - 类型:<input type="text" name="recordType"/>
  30 + 类型:<input type="text" name="recordType" th:value="${recordType}"/>
31 31 </li>
32 32 <li class="time">
33 33 <label>创建时间: </label>
... ... @@ -77,7 +77,8 @@
77 77 var editFlag = [[${@permission.hasPermi('config:statusFlowHeader:edit')}]];
78 78 var removeFlag = [[${@permission.hasPermi('config:statusFlowHeader:remove')}]];
79 79 var datas = [[${@dict.getType('sys_normal_disable')}]];
80   -
  80 + var moduleType = [[${@dict.getType('moduleType')}]];
  81 + var recordType = [[${@dict.getType('recordType')}]];
81 82 $(function() {
82 83 var options = {
83 84 url: prefix + "/list",
... ... @@ -112,11 +113,19 @@
112 113 },
113 114 {
114 115 field : 'moduleType',
115   - title : '模块'
  116 + title : '模块',
  117 + align : "center",
  118 + formatter: function (value, item, index) {
  119 + return $.table.selectDictLabel(moduleType, value);
  120 + }
116 121 },
117 122 {
118 123 field : 'recordType',
119   - title : '类型'
  124 + title : '类型',
  125 + align : "center",
  126 + formatter: function (value, item, index) {
  127 + return $.table.selectDictLabel(recordType, value);
  128 + }
120 129 },
121 130 {
122 131 field : 'enable',
... ...
src/main/resources/templates/config/waveMaster/waveMaster.html
... ... @@ -48,7 +48,7 @@
48 48 </div>
49 49  
50 50 <div class="btn-group hidden-xs" id="toolbar" role="group">
51   - <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="config:waveMaster:add">
  51 + <a class="btn btn-outline btn-success btn-rounded" onclick="matserAdd()" shiro:hasPermission="config:waveMaster:add">
52 52 <i class="fa fa-plus"></i> 新增
53 53 </a>
54 54 <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="config:waveMaster:remove">
... ... @@ -512,6 +512,11 @@
512 512 headerId = rowId;
513 513 detail();
514 514 }
  515 +
  516 + function matserAdd() {
  517 + var url = prefix+"/add";
  518 + $.modal.open("添加" + $.table._option.modalName, url);
  519 + }
515 520 </script>
516 521 </body>
517 522 </html>
518 523 \ No newline at end of file
... ...