From 854bb992352772d3c69b47549a709ff57b4944bb Mon Sep 17 00:00:00 2001
From: suerwei <18810552194@163.com>
Date: 星期四, 23 五月 2024 10:31:30 +0800
Subject: [PATCH] 管材管理_1
---
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/deviceLog/deviceLog.html | 118 ++++++++++++++++++++++++++++++++++-------------------------
1 files changed, 68 insertions(+), 50 deletions(-)
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/deviceLog/deviceLog.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/deviceLog/deviceLog.html
index 12b106c..97f26b9 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/deviceLog/deviceLog.html
+++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/deviceLog/deviceLog.html
@@ -11,30 +11,16 @@
<div class="select-list">
<ul>
<li>
- <p>鍑哄叆搴撳崟瀛愬彿锛�</p>
- <input type="text" name="code"/>
- </li>
- <li>
- <p>椤圭洰鍚嶇О锛�</p>
- <input type="text" name="projectName"/>
- </li>
- <li>
- <p>璁惧鍚嶇О锛�</p>
+ <p>鍚嶇О锛�</p>
<input type="text" name="deviceName"/>
</li>
- <li>
- <p>鍑哄叆搴撶被鍨嬶細</p>
- <select name="type" th:with="type=${@dict.getType('device_log_type')}">
- <option value="">鎵�鏈�</option>
- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
- </select>
- </li>
+
<li>
<p>缁忓姙浜猴細</p>
<input type="text" name="optUser"/>
</li>
<li>
- <p>浣跨敤浜猴細</p>
+ <p>璐熻矗浜猴細</p>
<input type="text" name="applyUser"/>
</li>
<li>
@@ -56,9 +42,12 @@
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="geo:deviceLog:remove">
<i class="fa fa-remove"></i> 鍒犻櫎
</a>
- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="geo:deviceLog:export">
- <i class="fa fa-download"></i> 瀵煎嚭
- </a>
+<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="geo:deviceLog:export">-->
+<!-- <i class="fa fa-download"></i> 瀵煎嚭-->
+<!-- </a>-->
+ <a class="btn btn-info" onclick="$.table.importExcel()" shiro:hasPermission="geo:deviceLog:import">
+ <i class="fa fa-upload"></i> 瀵煎叆
+ </a>
</div>
<div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table>
@@ -76,56 +65,62 @@
$(function() {
var options = {
url: prefix + "/list?projectId="+projectId,
- createUrl: prefix + "/add",
+ createUrl: prefix + "/add?projectId="+projectId,
updateUrl: prefix + "/edit/{id}",
removeUrl: prefix + "/remove",
exportUrl: prefix + "/export",
+ importUrl: prefix + "/importDeviceLog/"+projectId,
modalName: "璁惧鍑哄叆搴撹褰�",
columns: [{
checkbox: true
},
{
- field : 'id',
+ field : 'id',
title : '涓婚敭',
visible: false
},
{
- field : 'code',
- title : '鍑哄叆搴撳崟瀛愬彿'
+ field : 'code',
+ title : '宸ュ崟鍙�',
+ sortable:true
+ },
+
+ {
+ field : 'deviceCode',
+ title : '缂栧彿',
+ visible: false
+ },
+ {
+ field : 'deviceName',
+ title : '鍚嶇О'
+ },
+
+ {
+ field : 'inboundDate',
+ title : '鍏ュ簱鏃堕棿',
+ sortable:true
+ },
+ {
+ field : 'outboundDate',
+ title : '鍑哄簱鏃堕棿',
+ sortable:true
},
{
- field : 'projectName',
- title : '椤圭洰鍚嶇О'
+ field : 'optUser',
+ title : '缁忓姙浜�',
+ sortable:true
},
{
- field : 'deviceName',
- title : '璁惧鍚嶇О'
+ field : 'applyUser',
+ title : '璐熻矗浜�',
+ sortable:true
},
{
- field : 'type',
- title : '鍑哄叆搴撶被鍨�',
- formatter: function(value, row, index) {
- return $.table.selectDictLabel(typeDatas, value);
- }
+ field : 'number',
+ title : '鏁伴噺'
},
{
- field : 'transactionDate',
- title : '鍑哄叆搴撴椂闂�'
- },
- {
- field : 'optUser',
- title : '缁忓姙浜�'
- },
- {
- field : 'applyUser',
- title : '浣跨敤浜�'
- },
- {
- field : 'number',
- title : '鍑哄叆搴撴暟閲�'
- },
- {
- field : 'remark',
+ field : 'remark',
title : '澶囨敞'
},
{
@@ -141,6 +136,29 @@
};
$.table.init(options);
});
+
+ //涓嬭浇
+ function importTemplate() {
+ var filename="璁惧鍑哄叆搴撹褰曟ā鏉�.xls";
+ window.location.href = ctx + "common/download?fileName=" + encodeURI(filename) + "&delete=" + false;
+ }
</script>
</body>
+
+<!-- 瀵煎叆鍖哄煙 -->
+<script id="importTpl" type="text/template">
+ <form enctype="multipart/form-data" class="mt20 mb10">
+ <div class="col-xs-offset-1">
+ <input type="file" id="file" name="file"/>
+ <div class="mt10 pt5">
+ <input type="checkbox" id="updateSupport" name="updateSupport" title="瀵煎叆璁惧鍑哄叆搴撲俊鎭�"> 鏄惁鏇存柊宸茬粡瀛樺湪鐨勬暟鎹�
+ <a onclick="importTemplate()" class="btn btn-default btn-xs"><i class="fa fa-file-excel-o"></i> 涓嬭浇妯℃澘</a>
+ </div>
+ <font color="red" class="pull-left mt10">
+ 鎻愮ず锛氫粎鍏佽瀵煎叆鈥渪ls鈥濇垨鈥渪lsx鈥濇牸寮忔枃浠讹紒
+ </font>
+ </div>
+ </form>
+</script>
+
</html>
\ No newline at end of file
--
Gitblit v1.9.1