1、Excel批量快递查询导出完成

2、修复使用select2下拉框,重置值不改变的问题
This commit is contained in:
bo.yang 2021-07-24 18:40:40 +08:00
parent 5aefc888e1
commit 67cfa2b1d6
7 changed files with 30 additions and 22 deletions

View File

@ -18,6 +18,7 @@ import com.ruoyi.common.utils.poi.ExcelUtil;
import org.apache.shiro.authz.annotation.RequiresPermissions; import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
@ -85,7 +86,7 @@ public class ExpImportQueryController extends BaseController
/** /**
* 导出Excel批量快递查询列表 * 导出Excel批量快递查询列表
*/ */
@RequiresPermissions("bps:expImportQuery:export") @RequiresPermissions("bps:expressInfo:export")
@Log(title = "详细快递信息导出", businessType = BusinessType.EXPORT) @Log(title = "详细快递信息导出", businessType = BusinessType.EXPORT)
@PostMapping("/exportDetail") @PostMapping("/exportDetail")
@ResponseBody @ResponseBody
@ -160,9 +161,6 @@ public class ExpImportQueryController extends BaseController
@GetMapping("/detail/{sid}") @GetMapping("/detail/{sid}")
public String detail(@PathVariable("sid") Long sid, ModelMap mmap) public String detail(@PathVariable("sid") Long sid, ModelMap mmap)
{ {
/*ExpImportQuery expImportQuery = expImportQueryService.selectExpImportQueryById(sid);
mmap.put("expImportQuery", expImportQuery);*/
String queryId = expImportQueryService.selectExpImportQueryById(sid).getQueryId(); String queryId = expImportQueryService.selectExpImportQueryById(sid).getQueryId();
ExpressInfo expressInfo= new ExpressInfo(); ExpressInfo expressInfo= new ExpressInfo();
expressInfo.setQueryId(queryId); expressInfo.setQueryId(queryId);

View File

@ -20,7 +20,7 @@
</div> </div>
<div class="btn-group-sm" id="toolbar" role="group"> <div class="btn-group-sm" id="toolbar" role="group">
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bps:expressInfo:export"> <a class="btn btn-warning" onclick="$.table.exportExcel()" >
<i class="fa fa-download"></i> 导出 <i class="fa fa-download"></i> 导出
</a> </a>
</div> </div>
@ -41,7 +41,7 @@
$(function() { $(function() {
var options = { var options = {
url: prefix + "/localList", url: prefix + "/localList",
exportUrl: prefix + "/exportDetail", exportUrl: ctx+ "bps/expImportQuery/exportDetail",
modalName: "快递信息", modalName: "快递信息",
columns: [{ columns: [{
checkbox: true checkbox: true

View File

@ -42,7 +42,7 @@
<a class="btn btn-info" onclick="$.table.importExcel()"> <a class="btn btn-info" onclick="$.table.importExcel()">
<i class="fa fa-upload"></i> 导入 <i class="fa fa-upload"></i> 导入
</a> </a>
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="bps:expImportQuery:add"> <!--<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="bps:expImportQuery:add">
<i class="fa fa-plus"></i> 添加 <i class="fa fa-plus"></i> 添加
</a> </a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="bps:expImportQuery:edit"> <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="bps:expImportQuery:edit">
@ -53,7 +53,7 @@
</a> </a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bps:expImportQuery:export"> <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bps:expImportQuery:export">
<i class="fa fa-download"></i> 导出 <i class="fa fa-download"></i> 导出
</a> </a>-->
</div> </div>
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table> <table id="bootstrap-table"></table>

View File

@ -45,12 +45,12 @@
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="bps:expressInfo:remove"> <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="bps:expressInfo:remove">
<i class="fa fa-remove"></i> 删除 <i class="fa fa-remove"></i> 删除
</a>--> </a>-->
<a class="btn btn-info" onclick="$.table.importExcel()"> <!-- <a class="btn btn-info" onclick="$.table.importExcel()">
<i class="fa fa-upload"></i> 导入 <i class="fa fa-upload"></i> 导入
</a> </a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bps:expressInfo:export"> <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bps:expressInfo:export">
<i class="fa fa-download"></i> 导出 <i class="fa fa-download"></i> 导出
</a> </a>-->
</div> </div>
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table> <table id="bootstrap-table"></table>

View File

@ -13,7 +13,7 @@
<ul> <ul>
<li> <li>
<label>当前状态:</label> <label>当前状态:</label>
<select name="lastResultState" th:with="type=${@dict.getType('express_stats')}"> <select name="lastResultState" th:with="type=${@dict.getType('express_stats')}" class="form-control">
<option value="">---所有---</option> <option value="">---所有---</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
@ -28,7 +28,7 @@
</li> </li>
<li> <li>
<label>快递公司:</label> <label>快递公司:</label>
<select name="lastResultCom" th:with="type=${@dict.getType('express_company')}"> <select name="lastResultCom" th:with="type=${@dict.getType('express_company')}" class="form-control">
<option value="">---所有---</option> <option value="">---所有---</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
@ -39,7 +39,7 @@
</li> </li>
<li> <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a> <a class="btn btn-warning btn-rounded btn-sm" onclick="reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li> </li>
</ul> </ul>
</div> </div>
@ -220,6 +220,11 @@
}; };
$.table.init(options); $.table.init(options);
}); });
function reset(){
$('.form-control').val(null).trigger('change');
$.form.reset();
}
</script> </script>
</body> </body>
</html> </html>

View File

@ -14,7 +14,7 @@
<ul> <ul>
<li> <li>
快递公司: 快递公司:
<select name="company" th:with="type=${@dict.getType('express_company')}"> <select name="company" th:with="type=${@dict.getType('express_company')}" class="form-control">
<option value="">---所有---</option> <option value="">---所有---</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
@ -45,7 +45,7 @@
</li>--> </li>-->
<li> <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search();"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search();"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a> <a class="btn btn-warning btn-rounded btn-sm" onclick="reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
</li> </li>
<!-- <li> <!-- <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="sendForm()"><i class="fa fa-check"></i>&nbsp;订阅</a> <a class="btn btn-primary btn-rounded btn-sm" onclick="sendForm()"><i class="fa fa-check"></i>&nbsp;订阅</a>
@ -181,6 +181,11 @@
}); });
};*/ };*/
function reset(){
$('.form-control').val(null).trigger('change');
$.form.reset();
}
</script> </script>
</body> </body>
</html> </html>

View File

@ -7,7 +7,7 @@ ruoyi:
# 版权年份 # 版权年份
copyrightYear: 2021 copyrightYear: 2021
# 实例演示开关 # 实例演示开关
demoEnabled: false demoEnabled: true
# 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath # 文件路径 示例( Windows配置D:/ruoyi/uploadPathLinux配置 /home/ruoyi/uploadPath
profile: C:/bps-it/uploadPath profile: C:/bps-it/uploadPath
# 获取ip地址开关 # 获取ip地址开关