瀏覽代碼

商户管理已审核列表查询功能调整

kouchengxing 5 年之前
父節點
當前提交
24f1bf8bc2

+ 3 - 0
dgtly-admin/src/main/java/com/dgtly/web/controller/companyext/CompanyExamineController.java

@@ -76,6 +76,9 @@ public class CompanyExamineController extends BaseController
     public TableDataInfo list(CompanyExamine companyExamine)
     {
         startPage();
+        if(companyExamine.getStatus()==null){
+            companyExamine.setStatus(3);
+        }
         List<CompanyExamine> list = companyExamineService.selectCompanyExamineList(companyExamine);
         return getDataTable(list);
     }

+ 21 - 6
dgtly-admin/src/main/resources/templates/companyext/examine/yesExamine.html

@@ -21,6 +21,14 @@
                                     <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                                 </select>
                             </li>
+                            <li>
+                                <p>审核状态:</p>
+                                <select name="status">
+                                    <option value="">所有</option>
+                                    <option value="1">已通过</option>
+                                    <option value="2">已驳回</option>
+                                </select>
+                            </li>
                             <li>
                                 <p>企业法人:</p>
                                 <input type="text" name="legalPerson"/>
@@ -63,13 +71,12 @@
     </div>
     <th:block th:include="include :: footer" />
     <script th:inline="javascript">
-        var editFlag = [[${@permission.hasPermi('system:examine:edit')}]];
-        var removeFlag = [[${@permission.hasPermi('system:examine:remove')}]];
+        var companyTypes = [[${@dict.getType('company_type')}]];
+        var examineStatus = [[${@dict.getType('examine_status')}]];
         var prefix = ctx + "companyext/examine";
-
         $(function() {
             var options = {
-                url: prefix + "/list?status=1",
+                url: prefix + "/list",
                 createUrl: prefix + "/add",
                 updateUrl: prefix + "/edit/{id}",
                 removeUrl: prefix + "/remove",
@@ -94,7 +101,11 @@
                     },
                     {
                         field : 'companyType',
-                        title : '企业类型'
+                        title : '企业类型',
+                        align: 'center',
+                        formatter: function(value, row, index) {
+                            return $.table.selectDictLabel(companyTypes, value);
+                        }
                     },
                     {
                         field : 'legalPerson',
@@ -106,7 +117,11 @@
                     },
                     {
                         field : 'status',
-                        title : '审核状态'
+                        title : '审核状态',
+                        align: 'center',
+                        formatter: function(value, row, index) {
+                            return $.table.selectDictLabel(examineStatus, value);
+                        }
                     },
                     {
                         field : 'applyDate',

+ 3 - 2
dgtly-system/src/main/resources/mapper/companyext/CompanyExamineMapper.xml

@@ -53,9 +53,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         WHERE ce.company_id = cei.company_id AND ce.del_flag  = '0' AND cei.del_flag = '0'
         AND cei.version_num = (SELECT MAX(a.version_num) FROM company_ext_info a WHERE a.company_id = ce.company_id)
         <if test="companyName != null and companyName != ''"> and cei.company_name like concat('%', #{companyName}, '%')</if>
-        <if test="companyType != null "> and cei.company_type = #{companyType}</if>
+        <if test="companyType != null and companyType != ''"> and cei.company_type = #{companyType}</if>
         <if test="legalPerson != null and legalPerson != ''"> and cei.legal_person like concat('%', #{legalPerson}, '%')</if>
-        <if test="status != null "> and ce.status = #{status}</if>
+        <if test="status != null and status != 3"> and ce.status = #{status}</if>
+        <if test="status != null and status == 3"> and (ce.status = 1 or ce.status = 2)</if>
         <if test="applyDate != null and applyDate != ''"> and date_format(ce.apply_date,'%Y-%m-%d') = #{applyDate}</if>
         <if test="examineDate != null and examineDate != ''"> and date_format(ce.examine_date,'%Y-%m-%d') = #{examineDate}</if>
     </select>