多单位版国产化地质资料管理系统
zhai
2025-12-18 3c6f6c1e3016e38146a4c46be6e7b625c35591f2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
 
<!DOCTYPE HTML>
<html>
<head>
    <base href="<%=basePath%>">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>我的实物利用单</title>
    <link href="static/plugins/font-awesome/css/font-awesome.css" rel="stylesheet" type="text/css">
    <link href="static/plugins/jquery-easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css">
    <link href="static/styles/initialize.css" rel="stylesheet" type="text/css">
    <link href="static/styles/common.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" href="static/plugins/layer/skin/default/layer.css" type="text/css">
 
    <script type="text/javascript" src="static/plugins/jquery/jquery.min.js"></script>
    <script type="text/javascript" src="static/plugins/jquery-easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="static/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript" src="static/scripts/easyuiExtend.js"></script>
    <script type="text/javascript" src="static/scripts/jquery-extend.js"></script>
    <script type="text/javascript" src="static/plugins/layer/layer.js"></script>
    <script type="text/javascript" src="static/plugins/slimScroll/jquery.slimscroll.min.js"></script>
    <script type="text/javascript" src="static/plugins/jquery-easyui-edatagrid/jquery.edatagrid.js"></script>
    <!-- 弹窗加载组件 -->
    <script type="text/javascript" src="static/plugins/layer/layer.js"></script>
    <script type="text/javascript" src="static/plugins/spinjs/spin.js"></script>
    <script type="text/javascript" src="static/plugins/spinjs/jquery.spin.js"></script>
    <script type="text/javascript" src="static/plugins/jquery.blockUI.js"></script>
    <script type="text/javascript" src="static/plugins/ace/src-noconflict/ace.js"></script>
    <!-- wcp组件 -->
    <script type="text/javascript" src="static/wcp/scripts/wcp.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.layer.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.blockUI.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.spin.js"></script>
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.jquery.js"></script>
 
    <!--[if lt IE 9]>
    <script type="text/javascript" src="static/plugins/json2.js"></script>
    <![endif]-->
    <script type="text/javascript" src="static/wcp/scripts/libs/wcp.infoPicker.js"></script>
 
    <style>
        /* .panel-body{border:0 none;} */
        .tabs-header, .tabs-tool {
            background-color: #fff;
        }
 
        .textbox {
            margin-top: 3px;
        }
    </style>
</head>
 
<body>
<div class="pt-main-top clear">
    <div class="pt-nav">
        <span class="pt-title-icon"><i class="fa fa-language"></i></span>
        <div class="pt-title">
            <div>
                <h4>个人利用记录</h4>
            </div>
        </div>
    </div>
    <div class="pt-search">
        <p class="pt-retrieval">
            <input id="txtKeySearch" type="text" placeholder="请输入实物利用编码/实物利用人搜索">
            <button id="btnKeySearch">
                <i class="fa fa-search"></i>
            </button>
        </p>
        <input class="easyui-combobox" id="flowState"
               data-options="
                                                panelHeight: 'auto',
                                                valueField: 'label',
                                                textField: 'value',
                                                editable: false,
                                                width:100,
                                                data: [{
                                                    label: '-2',
                                                    value: '所有的',
                                                    selected: true
                                                }, 
                                                {
                                                    label: '0',
                                                    value: '流程中'
                                                },{
                                                    label: '1',
                                                    value: '已结束'
                                                },{
                                                    label: '-1',
                                                    value: '已终止'
                                                }]"/>
 
    </div>
</div>
<div class="pt-form-inline">
    <div id="right">
        <div>
            <table id="tb_physicalForm" style="width:100%;">
            </table>
        </div>
    </div>
</div>
</body>
 
<script type="text/javascript" src="static/scripts/ResizeScroll.js"></script>
<script>
    $(function () {
        $("#flowState").combobox({
            onChange: function (n, o) {
                getMyPhysicalFormList(n);
            }
        });
        //绑定关键字检索输入框回车事件
        $("#btnKeySearch").click(function () {
            SearchKey();
        });
 
        //关键字检索按钮事件
        $('#txtKeySearch').bind('keypress', function (event) {
            if (event.keyCode == "13") {
                SearchKey();
            }
        });
    })
 
    //关键字搜索方法
    function SearchKey() {
        var keyValue = $("#txtKeySearch").val();
        $('#tb_physicalForm').datagrid('load', {
            searchText: keyValue
        });
    }
 
    //删除实物利用单
    function deletePhysicalForm() {
        //获取dg选中的数据行
        var checkRows = $("#tb_physicalForm").datagrid("getChecked");
        if (checkRows.length == 0) {
            wcp.message.info("请选择需要删除的数据!");
        } else {
            var ids = new Array();
            $.each(checkRows, function (index, value) {
                ids.push(value.formId);
            });
            wcp.ui.setBusy("body", wcp.ajax({
                url: "physical/deletePhysicalForm",
                data: JSON.stringify(ids),
            }).done(function (result) {
                wcp.notify.success('删除成功!');
                $('#tb_physicalForm').datagrid('reload');
            }));
        }
    }
 
    //根据状态获取申请单列表
    function getMyPhysicalFormList(flowState) {
        var url = 'physical/getMyPhysicalFormList?flowState=' + flowState;
        $("#tb_physicalForm").datagrid({
            rownumbers: true,
            fitColumns: true,
            method: "get",
            checkOnSelect: false,
            selectOnCheck: false,
            pagination: true,
            sortOrder: 'desc',
            sortName: "form_id",
            url: url,
            toolbar: "#toolbar_form",
            emptyMsg: "没有找到匹配的记录",
            idField: "formId",
            columns: [[
                {
                    field: 'ck',
                    checkbox: true
                },
                {
                    field: 'applyCode',
                    title: '实物利用单编号',
                    width: 100,
                    sortable: true
                },
 
                {
                    field: 'applyUser',
                    title: '申请人',
                    width: 100,
                    sortable: true
                },
                {
                    field: 'telNumber',
                    title: '联系电话',
                    width: 100,
                    sortable: true
                },
                {
                    field: 'physicalDate',
                    title: '实物利用日期',
                    width: 100
                },
                {
                    field: 'flowStep',
                    title: '当前步骤信息',
                    width: 100
                }
            ]]
            , onClickRow: function (rowIndex, rowData) {
                var pageUrl = "physical/physicalForm?formId=" + rowData.formId;
                if (top.addPanel) {
                    top.addPanel(pageUrl, "我的实物利用单" + rowData.formId);
                    var curTabWin = null;
                    var curTab = top.$('#tt').tabs('getSelected');
                    if (curTab && curTab.find('iframe').length > 0) {
                        curTabWin = curTab.find('iframe')[0].contentWindow;
                        //将回调函数传给子页面
                        $(curTabWin).load(function () {
                            if (curTabWin.params) {
                                //将回调函数传给子页面
                                //if(ids){
                                //    curTabWin.params.ids = ids;
                                //}
                                curTabWin.params.callBack = refreshData;
                            }
                        });
                    }
                } else {
                    window.open(pageUrl);
                }
            }
            , rowStyler: function (index, row) {
                var curDate = new Date();
                var currentDate = getNowFormatDate(curDate);
                var utilizationValidDate = new Date(row.utilizationValidDate);
                var uvd = getNowFormatDate(utilizationValidDate);
                var backDate = utilizationValidDate.setDate(utilizationValidDate.getDate() - 3);
                var currentBackDate = getNowFormatDate(new Date(backDate));
                var color = "";
                if (row.originalphysical == 1 && row.state == 0 && row.flowState == 1 && uvd >= currentDate && currentDate >= currentBackDate) {
                    color = 'background-color:#FFF8DC;';
                }
                if (row.originalphysical == 1 && row.state == 0 && row.flowState == 1 && uvd <= currentDate) {
                    color = "background-color:red;";
                }
                return color;
            }
            , onLoadSuccess: function (data) {
                $('#tb_physicalForm').datagrid('clearChecked');
            }
        })
    }
 
    function getNowFormatDate(date) {
        var seperator1 = "-";
        var year = date.getFullYear();
        var month = date.getMonth() + 1;
        var strDate = date.getDate();
        if (month >= 1 && month <= 9) {
            month = "0" + month;
        }
        if (strDate >= 0 && strDate <= 9) {
            strDate = "0" + strDate;
        }
        var currentdate = year + seperator1 + month + seperator1 + strDate;
        return currentdate;
    }
 
    //刷新表格数据
    function refreshData() {
        $('#tb_physicalForm').datagrid('reload');
    }
 
</script>
</html>