Commit 1443ebbc9ec3a640c71a494a3fdb8a727b15c85a
1 parent
7a0fc21f
整理合并代码: 配置-库存资料-物料 运行模糊查询
Showing
3 changed files
with
21 additions
and
22 deletions
src/main/java/com/huaheng/pc/config/material/controller/MaterialController.java
... | ... | @@ -18,10 +18,6 @@ import com.huaheng.framework.web.page.TableDataInfo; |
18 | 18 | import com.huaheng.framework.web.page.TableSupport; |
19 | 19 | import com.huaheng.pc.config.material.domain.Material; |
20 | 20 | import com.huaheng.pc.config.material.service.MaterialService; |
21 | -import com.huaheng.pc.config.material.service.MaterialServiceImpl; | |
22 | -import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; | |
23 | -import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService; | |
24 | -import com.huaheng.pc.inventory.inventoryTransaction.domain.InventoryTransaction; | |
25 | 21 | import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; |
26 | 22 | import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService; |
27 | 23 | import io.swagger.annotations.Api; |
... | ... | @@ -76,10 +72,10 @@ public class MaterialController extends BaseController { |
76 | 72 | LambdaQueryWrapper<Material> lambda = Wrappers.lambdaQuery(); |
77 | 73 | lambda.gt(StringUtils.isNotEmpty(createdBegin), Material::getCreated, createdBegin) |
78 | 74 | .lt(StringUtils.isNotEmpty(createdEnd), Material::getCreated, createdEnd) |
79 | - .eq(StringUtils.isNotEmpty(material.getCode()), Material::getCode, material.getCode()) | |
80 | - .like(StringUtils.isNotEmpty(material.getName()), Material::getName, material.getName()) | |
75 | + .like(StringUtils.isNotNull(material.getCode())&& StringUtils.isNotEmpty(material.getCode()), Material::getCode, material.getCode()) | |
76 | + .like(StringUtils.isNotNull(material.getName())&& StringUtils.isNotEmpty(material.getName()), Material::getName, material.getName()) | |
81 | 77 | .eq(StringUtils.isNotEmpty(material.getType()), Material::getType, material.getType()) |
82 | - .like(StringUtils.isNotEmpty(material.getSpec()), Material::getSpec, material.getSpec()) | |
78 | + .like(StringUtils.isNotNull(material.getSpec())&& StringUtils.isNotEmpty(material.getSpec()), Material::getSpec, material.getSpec()) | |
83 | 79 | .eq(Material::getWarehouseCode, ShiroUtils.getWarehouseCode()) |
84 | 80 | .eq(Material::getDeleted, false); |
85 | 81 | |
... | ... |
src/main/resources/templates/config/material/material.html
... | ... | @@ -84,8 +84,19 @@ |
84 | 84 | checkbox: true |
85 | 85 | }, |
86 | 86 | { |
87 | + title: '操作', | |
88 | + align: 'center', | |
89 | + formatter: function(value, row, index) { | |
90 | + var actions = []; | |
91 | + // actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); | |
92 | + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); | |
93 | + return actions.join(''); | |
94 | + } | |
95 | + }, | |
96 | + { | |
87 | 97 | field : 'id', |
88 | - title : 'id' | |
98 | + title : 'id', | |
99 | + visible: false | |
89 | 100 | }, |
90 | 101 | { |
91 | 102 | field : 'code', |
... | ... | @@ -220,17 +231,8 @@ |
220 | 231 | formatter: function(value, row, index) { |
221 | 232 | return $.table.selectDictLabel(datas, value); |
222 | 233 | } |
223 | - }, | |
224 | - { | |
225 | - title: '操作', | |
226 | - align: 'center', | |
227 | - formatter: function(value, row, index) { | |
228 | - var actions = []; | |
229 | - // actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); | |
230 | - actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); | |
231 | - return actions.join(''); | |
232 | - } | |
233 | - }] | |
234 | + } | |
235 | + ] | |
234 | 236 | }; |
235 | 237 | $.table.init(options); |
236 | 238 | }); |
... | ... |
src/main/resources/templates/config/materialType/materialType.html
... | ... | @@ -64,15 +64,16 @@ |
64 | 64 | }, |
65 | 65 | { |
66 | 66 | field : 'id', |
67 | - title : '编码' | |
67 | + title : '标识', | |
68 | + visible: false | |
68 | 69 | }, |
69 | 70 | { |
70 | 71 | field : 'code', |
71 | - title : '物料编码' | |
72 | + title : '编码' | |
72 | 73 | }, |
73 | 74 | { |
74 | 75 | field : 'name', |
75 | - title : '物料名称' | |
76 | + title : '名称' | |
76 | 77 | }, |
77 | 78 | { |
78 | 79 | field : 'companyCode', |
... | ... |