| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@include file="/context/mytags.jsp"%>
- <t:base type="jquery,easyui,tools,DatePicker"></t:base>
- <div class="easyui-layout" fit="true">
- <div region="center" style="padding:0px;border:0px">
- <t:datagrid name="deviceList" checkbox="false" fitColumns="true" title="设备基础档案管理" actionUrl="deviceController.do?datagrid" idField="id" fit="true" queryMode="group" rowList="${['20','40','60','80','100']}" >
- <t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="设备编码" field="code" query="true" queryMode="single" width="120"></t:dgCol>
- <t:dgCol title="设备名称" field="name" query="true" queryMode="single" width="120" ></t:dgCol>
- <t:dgCol title="设备类型" field="typeId" query="true" queryMode="single" dictionary="P_device_type,type_code,type_name" width="120"></t:dgCol>
- <t:dgCol title="设备型号" field="deviceModel" width="120" ></t:dgCol>
- <t:dgCol title="设备规格" field="deviceSpecs" width="120" ></t:dgCol>
- <t:dgCol title="设备单位" field="deviceDepart" width="120" ></t:dgCol>
- <t:dgCol title="设备厂商" field="deviceFactory" width="120" ></t:dgCol>
- <t:dgCol title="库存" field="deviceStock" hidden="true" width="120" ></t:dgCol>
- <c:if test="${flg}">
- <t:dgToolBar title="新建" icon="icon-add" operationCode="add" url="deviceController.do?goAdd" funname="add"></t:dgToolBar>
- <t:dgToolBar title="修改" icon="icon-edit" operationCode="edit" url="deviceController.do?goUpdate" funname="update"></t:dgToolBar>
- <t:dgToolBar title="查看" icon="icon-search" url="deviceController.do?goUpdate" funname="detail"></t:dgToolBar>
- <t:dgToolBar title="删除" icon="icon-remove" operationCode="remove" url="deviceController.do?doDel" funname="logicDel"></t:dgToolBar>
- <t:dgToolBar title="导出" icon="icon-put" operationCode="put" funname="ExportXls"></t:dgToolBar>
- </c:if>
- </t:datagrid>
- </div>
- </div>
- <script src = "webpage/com/xcgl/device/deviceList.js"></script>
- <script type="text/javascript">
- function logicDel(){
- var rows = $("#deviceList").datagrid('getSelections');
- if (rows.length > 0) {
- if(rows) {
- $.messager.confirm("确认", "确定要删除这条数据?", function (r) {
- if (r) {
- $.ajax({
- url : "deviceController.do?doDel",
- type : 'post',
- data : {
- id : rows[0].id
- },
- cache : false,
- success : function(data) {
- var d = data;
- if (d.success) {
- var msg = d.msg;
- tip(msg);
- $("#deviceList").datagrid('reload');
- } else {
- layer.alert(d.msg);
- }
- }
- });
- }
- });
- }
- } else {
- layer.alert("请选择需要删除的数据");
- }
- }
- //编写自定义JS代码获得输入框中的值等父级页面调用取值
- function getSelectedRow(){
- var selectRows = $("#deviceList").datagrid('getSelections');
- return selectRows;
- }
- //导出
- function ExportXls() {
- JeecgExcelExport("deviceController.do?exportXlsByT", "deviceList");
- }
- </script>
|