|
@@ -70,7 +70,7 @@
|
|
<div class="layui-inline">
|
|
<div class="layui-inline">
|
|
<label class="layui-form-label">*工程名称</label>
|
|
<label class="layui-form-label">*工程名称</label>
|
|
<div class="layui-input-inline">
|
|
<div class="layui-input-inline">
|
|
- <input type="text" name="" lay-verify="title" class="layui-input">
|
|
|
|
|
|
+ <input type="text" name="projectName" lay-verify="title" class="layui-input">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -80,16 +80,18 @@
|
|
<div class="layui-upload">
|
|
<div class="layui-upload">
|
|
<button type="button" class="layui-btn layui-btn-normal" id="testList">选择文件</button>
|
|
<button type="button" class="layui-btn layui-btn-normal" id="testList">选择文件</button>
|
|
<div class="layui-upload-list">
|
|
<div class="layui-upload-list">
|
|
- <table class="layui-table">
|
|
|
|
|
|
+ <table class="layui-table" id="table">
|
|
<thead>
|
|
<thead>
|
|
- <tr><th>文件名</th>
|
|
|
|
|
|
+ <tr><th hidden>项目</th>
|
|
|
|
+ <th>文件名</th>
|
|
|
|
+ <th>项目名称</th>
|
|
<th>项目类型</th>
|
|
<th>项目类型</th>
|
|
<th>操作</th>
|
|
<th>操作</th>
|
|
</tr></thead>
|
|
</tr></thead>
|
|
<tbody id="demoList"></tbody>
|
|
<tbody id="demoList"></tbody>
|
|
</table>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
- <button type="button" class="layui-btn" id="testListAction">确定</button>
|
|
|
|
|
|
+ <button type="button" class="layui-btn" id="testListAction" onclick="sub()">确定</button>
|
|
</div>
|
|
</div>
|
|
<%--<!---------列表---------->--%>
|
|
<%--<!---------列表---------->--%>
|
|
<%--<div class="layui-form-item">--%>
|
|
<%--<div class="layui-form-item">--%>
|
|
@@ -122,16 +124,19 @@
|
|
,accept: 'file'
|
|
,accept: 'file'
|
|
,multiple: true
|
|
,multiple: true
|
|
,auto: false
|
|
,auto: false
|
|
- ,bindAction: '#testListAction'
|
|
|
|
|
|
+ // ,bindAction: '#testListAction'
|
|
,choose: function(obj){
|
|
,choose: function(obj){
|
|
var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列
|
|
var files = this.files = obj.pushFile(); //将每次选择的文件追加到文件队列
|
|
//读取本地文件
|
|
//读取本地文件
|
|
// var xml = "<select name=\"type\"><option value=\"\">请选择</option><option value=\"1\">架空线路工程</option><option value=\"2\">电缆工程</option></select>";
|
|
// var xml = "<select name=\"type\"><option value=\"\">请选择</option><option value=\"1\">架空线路工程</option><option value=\"2\">电缆工程</option></select>";
|
|
obj.preview(function(index, file, result){
|
|
obj.preview(function(index, file, result){
|
|
- alert(file);
|
|
|
|
var tr = $(['<tr id="upload-'+ index +'">'
|
|
var tr = $(['<tr id="upload-'+ index +'">'
|
|
|
|
+ ,'<td hidden>'+ file +'</td>'
|
|
,'<td>'+ file.name +'</td>'
|
|
,'<td>'+ file.name +'</td>'
|
|
,'<td>'
|
|
,'<td>'
|
|
|
|
+ ,' <input type="text" >'
|
|
|
|
+ ,'</td>'
|
|
|
|
+ ,'<td>'
|
|
,' <select name="type" class="myselect" id="myselect"><option value="">请选择</option><option value="1">架空线路工程</option><option value="2">电缆工程</option></select>'
|
|
,' <select name="type" class="myselect" id="myselect"><option value="">请选择</option><option value="1">架空线路工程</option><option value="2">电缆工程</option></select>'
|
|
,'</td>'
|
|
,'</td>'
|
|
,'<td>'
|
|
,'<td>'
|
|
@@ -176,4 +181,17 @@
|
|
|
|
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
|
|
+<script>
|
|
|
|
+ function sub() {
|
|
|
|
+ var array = [];
|
|
|
|
+ $("#table tr").each(function () {
|
|
|
|
+ var text = $(this).children("td:first-child").text();
|
|
|
|
+ if(text != null){
|
|
|
|
+ array.push(text)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ array.splice(0,1);
|
|
|
|
+ alert(array);
|
|
|
|
+ }
|
|
|
|
+</script>
|
|
</html>
|
|
</html>
|