Commit 80587cef6b33a9e063fe38a93e7b15e54c7779b5
1 parent
96d815b8
货主页面调整
Showing
9 changed files
with
55 additions
and
33 deletions
src/main/java/com/huaheng/pc/general/company/controller/CompanyController.java
... | ... | @@ -2,6 +2,7 @@ package com.huaheng.pc.general.company.controller; |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
4 | 4 | import com.baomidou.mybatisplus.plugins.Page; |
5 | +import com.huaheng.pc.general.company.mapper.CompanyMapper; | |
5 | 6 | import org.apache.shiro.authz.annotation.RequiresPermissions; |
6 | 7 | import org.springframework.beans.factory.annotation.Autowired; |
7 | 8 | import org.springframework.stereotype.Controller; |
... | ... | @@ -34,6 +35,7 @@ public class CompanyController extends BaseController |
34 | 35 | @Autowired |
35 | 36 | private ICompanyService companyService; |
36 | 37 | |
38 | + | |
37 | 39 | @RequiresPermissions("general:company:view") |
38 | 40 | @GetMapping() |
39 | 41 | public String company() |
... | ... | @@ -50,8 +52,10 @@ public class CompanyController extends BaseController |
50 | 52 | public TableDataInfo list(Company company) |
51 | 53 | { |
52 | 54 | Page<Company> page = getPage(); |
55 | + company.setDeleted(false); | |
53 | 56 | EntityWrapper<Company> entityWrapper = new EntityWrapper(); |
54 | - companyService.selectPage(page, entityWrapper) ; | |
57 | + entityWrapper.setEntity(company); | |
58 | + companyService.selectPage(page, entityWrapper) ; | |
55 | 59 | return getDataTable(page); |
56 | 60 | } |
57 | 61 | |
... | ... |
src/main/java/com/huaheng/pc/general/company/mapper/CompanyMapper.java
src/main/java/com/huaheng/pc/general/company/service/CompanyServiceImpl.java
src/main/java/com/huaheng/pc/general/company/service/ICompanyService.java
src/main/resources/templates/general/company/add.html
... | ... | @@ -20,7 +20,10 @@ |
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="type" name="type" class="form-control" type="text"> | |
23 | + <!--<input id="type" name="type" class="form-control" type="text">--> | |
24 | + <select id="type" class="form-control m-b" th:with="companyType=${@dict.getType('companyType')}"> | |
25 | + <option th:each="dict : ${companyType}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option> | |
26 | + </select> | |
24 | 27 | </div> |
25 | 28 | </div> |
26 | 29 | <div class="form-group"> |
... | ... | @@ -122,13 +125,14 @@ |
122 | 125 | <div class="form-group"> |
123 | 126 | <label class="col-sm-3 control-label">是否有效:</label> |
124 | 127 | <div class="col-sm-8"> |
125 | - <input id="enable" name="enable" class="form-control" type="text"> | |
126 | - </div> | |
127 | - </div> | |
128 | - <div class="form-group"> | |
129 | - <label class="col-sm-3 control-label">是否删除:</label> | |
130 | - <div class="col-sm-8"> | |
131 | - <input id="deleted" name="deleted" class="form-control" type="text"> | |
128 | + <!--<input id="enable" name="enable" class="form-control" type="text">--> | |
129 | + <div class="onoffswitch"> | |
130 | + <input type="checkbox" th:checked="true" class="onoffswitch-checkbox" id="enable" name="enable"> | |
131 | + <label class="onoffswitch-label" for="enable"> | |
132 | + <span class="onoffswitch-inner"></span> | |
133 | + <span class="onoffswitch-switch"></span> | |
134 | + </label> | |
135 | + </div> | |
132 | 136 | </div> |
133 | 137 | </div> |
134 | 138 | <div class="form-group"> |
... | ... |
src/main/resources/templates/general/company/company.html
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 | var editFlag = [[${@permission.hasPermi('general:company:edit')}]]; |
23 | 23 | var removeFlag = [[${@permission.hasPermi('general:company:remove')}]]; |
24 | 24 | var prefix = ctx + "general/company" |
25 | - | |
25 | + var datas = [[${@dict.getType('sys_normal_disable')}]]; | |
26 | 26 | $(function() { |
27 | 27 | var options = { |
28 | 28 | url: prefix + "/list", |
... | ... | @@ -115,23 +115,26 @@ |
115 | 115 | }, |
116 | 116 | { |
117 | 117 | field : 'enable', |
118 | - title : '是否有效' | |
119 | - }, | |
120 | - { | |
121 | - field : 'deleted', | |
122 | - title : '是否删除' | |
118 | + title : '是否有效' , | |
119 | + align: 'center', | |
120 | + formatter: function(value, row, index) { | |
121 | + return $.table.selectDictLabel(datas, value); | |
122 | + } | |
123 | 123 | }, |
124 | 124 | { |
125 | 125 | field : 'userDef1', |
126 | - title : '自定义字段1' | |
126 | + title : '自定义字段1' , | |
127 | + visible:false | |
127 | 128 | }, |
128 | 129 | { |
129 | 130 | field : 'userDef2', |
130 | - title : '自定义字段2' | |
131 | + title : '自定义字段2' , | |
132 | + visible:false | |
131 | 133 | }, |
132 | 134 | { |
133 | 135 | field : 'userDef3', |
134 | - title : '自定义字段3' | |
136 | + title : '自定义字段3' , | |
137 | + visible:false | |
135 | 138 | }, |
136 | 139 | { |
137 | 140 | title: '操作', |
... | ... |
src/main/resources/templates/general/company/edit.html
... | ... | @@ -123,15 +123,17 @@ |
123 | 123 | <div class="form-group"> |
124 | 124 | <label class="col-sm-3 control-label">是否有效:</label> |
125 | 125 | <div class="col-sm-8"> |
126 | - <input id="enable" name="enable" th:field="*{enable}" class="form-control" type="text"> | |
127 | - </div> | |
128 | - </div> | |
129 | - <div class="form-group"> | |
130 | - <label class="col-sm-3 control-label">是否删除:</label> | |
131 | - <div class="col-sm-8"> | |
132 | - <input id="deleted" name="deleted" th:field="*{deleted}" class="form-control" type="text"> | |
126 | + <!--<input id="enable" name="enable" th:field="*{enable}" class="form-control" type="text">--> | |
127 | + <div class="onoffswitch"> | |
128 | + <input type="checkbox" th:checked="*{enable}" class="onoffswitch-checkbox" id="enable" name="enable"> | |
129 | + <label class="onoffswitch-label" for="enable"> | |
130 | + <span class="onoffswitch-inner"></span> | |
131 | + <span class="onoffswitch-switch"></span> | |
132 | + </label> | |
133 | + </div> | |
133 | 134 | </div> |
134 | 135 | </div> |
136 | + | |
135 | 137 | <div class="form-group"> |
136 | 138 | <label class="col-sm-3 control-label">自定义字段1:</label> |
137 | 139 | <div class="col-sm-8"> |
... | ... |
src/main/resources/templates/receipt/receiptHeader/edit.html
... | ... | @@ -28,7 +28,7 @@ |
28 | 28 | <div class="form-group"> |
29 | 29 | <label class="col-sm-3 control-label">入库类型:</label> |
30 | 30 | <div class="col-sm-8"> |
31 | - <select id="type" class="form-control m-b" th:with="receiptHeaderType=${@dict.getType('receiptHeaderType')}"> | |
31 | + <select id="type" class="form-control m-b" th:with="receiptHeaderType=${@dict.getType('receiptType')}"> | |
32 | 32 | <option th:each="dict : ${receiptHeaderType}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}" th:field="*{type}></option> |
33 | 33 | </select> |
34 | 34 | </div> |
... | ... |
src/main/resources/templates/receipt/receiptHeader/receiptHeader.html
... | ... | @@ -21,8 +21,8 @@ |
21 | 21 | <script th:inline="javascript"> |
22 | 22 | var editFlag = [[${@permission.hasPermi('receipt:bill:edit')}]]; |
23 | 23 | var removeFlag = [[${@permission.hasPermi('receipt:bill:remove')}]]; |
24 | - var prefix = ctx + "receipt/receiptHeader" | |
25 | - | |
24 | + var prefix = ctx + "receipt/receiptHeader"; | |
25 | + var datas = [[${@dict.getType('sys_normal_disable')}]]; | |
26 | 26 | $(function() { |
27 | 27 | var options = { |
28 | 28 | url: prefix + "/list", |
... | ... | @@ -123,19 +123,26 @@ |
123 | 123 | }, |
124 | 124 | { |
125 | 125 | field : 'enable', |
126 | - title : '是否有效' | |
126 | + title : '是否有效', | |
127 | + align: 'center', | |
128 | + formatter: function(value, row, index) { | |
129 | + return $.table.selectDictLabel(datas, value); | |
130 | + } | |
127 | 131 | }, |
128 | 132 | { |
129 | 133 | field : 'userDef1', |
130 | - title : '自定义字段1' | |
134 | + title : '自定义字段1', | |
135 | + visible: false | |
131 | 136 | }, |
132 | 137 | { |
133 | 138 | field : 'userDef2', |
134 | - title : '自定义字段2' | |
139 | + title : '自定义字段2', | |
140 | + visible: false | |
135 | 141 | }, |
136 | 142 | { |
137 | 143 | field : 'userDef3', |
138 | - title : '自定义字段3' | |
144 | + title : '自定义字段3' , | |
145 | + visible: false | |
139 | 146 | }, |
140 | 147 | { |
141 | 148 | title: '操作', |
... | ... |