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
| $(function () {
| $('#applyjqGrid').jqGrid('clearGridData');
| $("#applyjqGrid").jqGrid({
| url: restServerBaseURL + 'sys/systeminfoapply/list?appid=' + GetQueryString("appid") + "&auditresult=" + GetQueryString("auditresult"),
| datatype: "json",
| colModel: [
| {label: '系统编号', name: 'userid', index: 'USERID', width: 20, key: true, hidden: true},
| {label: '姓名', name: 'chinesename', index: 'chinesename', width: 40, align: 'center'},
| {label: '单位', name: 'unitname', index: 'unitname', width: 50, align: 'center'},
| {
| label: '审核状态',
| width: 30,
| sortable: false,
| align: 'center',
| formatter: function (value, grid, rows, state) {
| var id = rows.id;
| var html = "";
| var opition = rows.auditopinion==null?'':rows.auditopinion;
| html = "<a data-toggle=\"modal\" data-target=\"#opinionModal\" onclick='ShowOpinion(\"" + opition + "\")' style='color: black;cursor: pointer;text-decoration:underline;'>" + (rows.auditresult == 1 ? "通过" : rows.auditresult == 0?" 待审核":"不通过" ) + "</a>";
| return html;
| }
| }
| ],
| height: "auto",
| viewrecords: true,
| rowNum: 10,
| rownumbers: true,
| rownumWidth: 50,
| autowidth: true,
| multiselect: false,
| pager: "#applyjqGridPager",
| jsonReader: {
| root: "page.list",
| page: "page.currPage",
| total: "page.totalPage",
| records: "page.totalCount"
| },
| prmNames: {
| page: "page",
| rows: "limit",
| order: "order"
| },
| gridComplete: function () {
| //隐藏grid底部滚动条
| $("#applyjqGrid").closest(".ui-jqgrid-bdiv").css({"overflow-x": "hidden"});
| },
| onSortCol: function (index, colindex, sortorder) {
| jQuery("#applyjqGrid").jqGrid('setGridParam', {
| page: $(".ui-pg-input").val()
| });
| }
| }).trigger('reloadGrid');
| jQuery("#applyjqGrid").jqGrid('setLabel', 'rn', '序号', {
| 'text-align': 'center',
| 'vertical-align': 'middle',
| "width": "50"
| });
| $("#applyjqGrid").setGridWidth(545);
| });
|
| function GetQueryString(name) {
| var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
| var r = window.location.search.substr(1).match(reg);
| if (r != null) return unescape(r[2]);
| return null;
| }
|
| function ShowAuditResult(id) {
| $("#applyid").val(id);
| }
|
| function SaveAuditResult() {
| var isSelect = false;
| var status = 0;
| $("[type=radio]").each(function () {
| if ($(this).prop("checked") == true) {
| status = $(this).val();
| isSelect = true;
| }
| })
| if (!isSelect) {
| alert("请选择结果!");
| return false;
| }
| $.ajax({
| url: restServerBaseURL + 'sys/systeminfoapply/saveresult',
| type: 'post',
| dataType: "json",
| data: {'applyid': $("#applyid").val(), 'auditresult': status, 'auditopinion': $("#auditopinion").val()},
| success: function (data) {
| if (data.result == '1') {
| alert("批复成功!");
| CloseModal();
| parent.$("#applyModal").modal("hide");
| parent.vm.query();
| } else {
| alert("批复失败!");
| CloseModal();
| }
| },
| error: function (e) {
| alert(e.message);
| }
| });
| }
|
| function CloseModal() {
| $("#resultModal").modal("hide");
| }
|
| function ShowOpinion(opinion) {
| $("#opinionDiv").html(opinion);
| }
|
|