xuefy 3 роки тому
батько
коміт
2c8845ae89

+ 19 - 1
adm/src/main/webapp/admin/stockManage/totalShipment.html

@@ -48,6 +48,14 @@
 	       	</div>
 	  </form>
 	</div>
+	<div class="order-select back-border" id="content" style="display: block;">
+		<div class="layui-inline" id="allStockDiv">
+			<label class="f12-gray4">选中行发运总重量:</label>
+			<div class="layui-input-inline">
+				<input type="text" class="layui-input" id="totalWeight" name="totalWeight" value = "0" style="border:none;color: red" disabled="disabled" class="search-select">
+			</div>
+		</div>
+	</div>
 	<div class="shadow-content"  >
 		<div class="gray-title demoTable">
 			<button class="layui-btn left-bnt1 in-b" id="down2">
@@ -88,7 +96,8 @@
 		    ,where:{MINView:"JSON"}
 		    ,page: true //开启分页
 		    ,cols: [[ //表头
-		               {type:'numbers',title: '序号',width:'5%', sort: true}
+		              {type:'checkbox',fixed:'left'}
+		               ,{type:'numbers',title: '序号',width:'5%', sort: true}
 				       ,{field: 'fhDate', title: '发运日期', width:"10%"}
 				       ,{field: 'forwardingUnit', title: '发运厂家', width:"10%"}
 				       ,{field: 'productName', title: '产品名称', width:"8%"}
@@ -114,6 +123,15 @@
 		      }
 		    ,even: true //开启隔行背景
 		  });
+	    table.on('checkbox(tableFilterOne)', function(obj){
+			  var checkStatus = table.checkStatus('tableTestOne'); //idTest 即为基础参数 id 对应的值
+			  var checkData = checkStatus.data;
+			  var checkWeight = 0;
+			  for (var i = 0; i < checkData.length; i ++) {
+				  checkWeight = accAdd(checkWeight,isEmpty(checkData[i].weight)?0:checkData[i].weight,4);
+			  }
+			  $("#totalWeight").val(checkWeight);
+		});
 		$('.demoTableOne .layui-btn').on('click', function(){
 		  	var type = $(this).data('type');
 		  	active[type] ? active[type].call(this) : '';