Ver Código Fonte

物资档案添加

liuzhen 5 anos atrás
pai
commit
c33f027eb5

+ 76 - 0
CallCenterWeb.UI/ArchivesManagement/ArchivesList.html

@@ -0,0 +1,76 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<title>客户信息</title>
7
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+		<script src="../Script/Common/huayi.load.js"></script>
9
+		<script src="../Script/Common/huayi.config.js"></script>
10
+		<link href="../css/WorkOrder/Search.css" rel="stylesheet">
11
+		<link href="../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />
12
+		<link href="../css/init.css" rel="stylesheet" />
13
+		<style>
14
+			.tool_bars{
15
+				margin-bottom: 10px;
16
+			}
17
+		</style>
18
+	</head>
19
+
20
+	<body class="gray-bg">
21
+		<div class="daoHang clearfix">
22
+			<div class="dhLeft">
23
+				<sapn><i class="syIcon"></i>位置:
24
+					<a href="javaScript:;" id="ReIndex">首页</a>&gt;
25
+					<a href="javaScript:;">档案物资管理</a>&gt;
26
+					<a href="" class="nowPosition">物资基础信息列表</a>
27
+				</sapn>
28
+			</div>
29
+			<div class="dhRight">
30
+				<a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
31
+			</div>
32
+		</div>
33
+		<div class="wrapper wrapper-content animated fadeInRight">
34
+			<div class="toolBox clearfix">
35
+				<div class="pull-left">
36
+					<div class="form-inline">
37
+						<div class="form-group">
38
+							<input type="text" class="form-control" id="sc_contel" placeholder="请输入物资名称" />
39
+						</div>
40
+					</div>
41
+				</div>
42
+
43
+				<div class="pull-right tool_bars">
44
+					<button class="btns" id="sc_btns">搜索</button>
45
+					<button class="btns" id="btn_add">添加</button>
46
+					<input type="button" class="btns" onclick="btn_export()" value="导入" />
47
+					<a type="button" class="btns btn_export1"  >导出</a>
48
+				</div>
49
+			</div>
50
+
51
+			<div style="width: 100%;padding: 10px;">
52
+				<table id="cusList" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
53
+					<thead>
54
+						<tr>
55
+							<!--<th data-checkbox="true"></th>-->
56
+							<!--<th data-field="F_CustomerCode" data-align="center">客户编号</th>-->
57
+							<th data-field="A_archiveName" data-align="center">物资名称</th>
58
+							<th data-field="stateName" data-align="center">物资状态</th>
59
+							<th data-field="OperationDate" data-align="center">最近一次变更时间</th>
60
+							<th data-field="A_archivePeople" data-align="center">操作人</th>
61
+							<th data-field="OperationContent" data-align="center">变更记录</th>
62
+							<th data-field="F_CustomerId" data-formatter="formatterOprate" data-align="center">操作</th>
63
+						</tr>
64
+					</thead>
65
+				</table>
66
+			</div>
67
+			
68
+		</div>
69
+		<script src="../js/laydate/laydate.js"></script>
70
+		<script src="../js/bootstrap-select/js/bootstrap-select.js"></script>
71
+		<script src="../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>
72
+		<script src="js/archivesListInfo.js"></script>
73
+
74
+	</body>
75
+
76
+</html>

+ 56 - 0
CallCenterWeb.UI/ArchivesManagement/customerOperation.html

@@ -0,0 +1,56 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<title>信息操作</title>
7
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+		<script src="../Script/Common/huayi.load.js"></script>
9
+		<script src="../Script/Common/huayi.config.js"></script>
10
+		<link href="../css/WorkOrder/Search.css" rel="stylesheet">
11
+		<link href="../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />
12
+		<link href="../css/init.css" rel="stylesheet" />
13
+		<style>
14
+			.tool_bars{
15
+				margin-bottom: 10px;
16
+			}
17
+		</style>
18
+	</head>
19
+
20
+	<body class="gray-bg">
21
+		<div class="daoHang clearfix">
22
+			<div class="dhLeft">
23
+				<sapn><i class="syIcon"></i>位置:
24
+					<a href="javaScript:;" id="ReIndex">首页</a>&gt;
25
+					<a href="javaScript:;">档案物资管理</a>&gt;
26
+					<a href="" class="nowPosition">客户操作记录表</a>
27
+				</sapn>
28
+			</div>
29
+			<div class="dhRight">
30
+				<a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
31
+			</div>
32
+		</div>
33
+		<div class="wrapper wrapper-content animated fadeInRight">
34
+			<div style="width: 100%;padding: 10px;">
35
+				<table id="cusList" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
36
+					<thead>
37
+						<tr>
38
+							<th data-field="A_archiveName" data-align="center">物资名称</th>
39
+							<th data-field="BorrowOreturn" data-align="center">物资状态</th>
40
+							<th data-field="BorrowDate" data-align="center">时间</th>
41
+							<th data-field="BorrowPeople" data-align="center">操作人</th>
42
+							<th data-field="id" data-formatter="formatterOprate" data-align="center">操作</th>
43
+						</tr>
44
+					</thead>
45
+				</table>
46
+			</div>
47
+			
48
+		</div>
49
+		<script src="../js/laydate/laydate.js"></script>
50
+		<script src="../js/bootstrap-select/js/bootstrap-select.js"></script>
51
+		<script src="../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>
52
+		<script src="js/khOperation.js"></script>
53
+
54
+	</body>
55
+
56
+</html>

+ 56 - 0
CallCenterWeb.UI/ArchivesManagement/infoManagement.html

@@ -0,0 +1,56 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<title>信息操作</title>
7
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+		<script src="../Script/Common/huayi.load.js"></script>
9
+		<script src="../Script/Common/huayi.config.js"></script>
10
+		<link href="../css/WorkOrder/Search.css" rel="stylesheet">
11
+		<link href="../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />
12
+		<link href="../css/init.css" rel="stylesheet" />
13
+		<style>
14
+			.tool_bars{
15
+				margin-bottom: 10px;
16
+			}
17
+		</style>
18
+	</head>
19
+
20
+	<body class="gray-bg">
21
+		<div class="daoHang clearfix">
22
+			<div class="dhLeft">
23
+				<sapn><i class="syIcon"></i>位置:
24
+					<a href="javaScript:;" id="ReIndex">首页</a>&gt;
25
+					<a href="javaScript:;">档案物资管理</a>&gt;
26
+					<a href="" class="nowPosition">员工操作记录表</a>
27
+				</sapn>
28
+			</div>
29
+			<div class="dhRight">
30
+				<a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
31
+			</div>
32
+		</div>
33
+		<div class="wrapper wrapper-content animated fadeInRight">
34
+			<div style="width: 100%;padding: 10px;">
35
+				<table id="cusList" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
36
+					<thead>
37
+						<tr>
38
+							<th data-field="A_archiveName" data-align="center">物资名称</th>
39
+							<th data-field="Warehousing" data-align="center">物资状态</th>
40
+							<th data-field="WarehousingDate" data-align="center">时间</th>
41
+							<th data-field="Operator" data-align="center">操作人</th>
42
+							<th data-field="id" data-formatter="formatterOprate" data-align="center">操作</th>
43
+						</tr>
44
+					</thead>
45
+				</table>
46
+			</div>
47
+			
48
+		</div>
49
+		<script src="../js/laydate/laydate.js"></script>
50
+		<script src="../js/bootstrap-select/js/bootstrap-select.js"></script>
51
+		<script src="../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>
52
+		<script src="js/infoList.js"></script>
53
+
54
+	</body>
55
+
56
+</html>

+ 71 - 0
CallCenterWeb.UI/ArchivesManagement/js/addOrEditArchivesList.js

@@ -0,0 +1,71 @@
1
+/**
2
+ * 修改增加档案物资信息
3
+ * */
4
+$(function() {
5
+	var editId = helper.request.queryString("edit_id");
6
+	//物资状态
7
+	$.getJSON(huayi.config.callcenter_url + "archives/GetArchivestate", {
8
+		token: $.cookie("token")
9
+	}, function(result) {
10
+		if(result.state.toLowerCase() == "success") {
11
+			seatlist = result.data;
12
+			WZstate($("#state"));
13
+		}
14
+	});
15
+	if(editId){
16
+		getArchivesDetail(editId);
17
+	}
18
+	$('#btn_save').click(function() {
19
+		saveArchives()
20
+	})
21
+	//保存档案物资
22
+	function saveArchives() {
23
+		if(editId) {
24
+			var isadd = 1
25
+		} else {
26
+			var isadd = 0
27
+			editId = ''
28
+		}
29
+		$.post(huayi.config.callcenter_url + 'archives/AddorUpdateArchives', {
30
+			isadd: isadd,
31
+			id: editId,
32
+			A_archiveCode: $('#customer_code').val(),
33
+			A_archiveName: $('#customer_name').val(),
34
+			A_archiveState: $('#state').val(),
35
+			token: $.cookie("token")
36
+		}, function(data) {
37
+			data = JSON.parse(data);
38
+			if(data.state.toLowerCase() == "success") {
39
+				var index = parent.layer.getFrameIndex(window.name);
40
+				parent.layer.close(index);
41
+				parent.layer.msg("保存成功");
42
+				parent.initTable();
43
+			}
44
+		});
45
+	}
46
+	
47
+});
48
+
49
+
50
+//获取物资状态
51
+function WZstate(obj) {
52
+	obj.empty();
53
+	obj.append('<option value="">请选择状态</option>');
54
+	$(seatlist).each(function(i, n) {
55
+		obj.append('<option value="' + n.id + '">' + n.stateName + '</option>');
56
+	})
57
+}
58
+
59
+//获取详情
60
+function getArchivesDetail(editId) {
61
+	$.getJSON(huayi.config.callcenter_url + "archives/GetModelarchives", {
62
+		id: editId,
63
+		token: $.cookie("token")
64
+	}, function(data) {
65
+		if(data.state=='success'){
66
+			$('#customer_code').val(data.data.A_archiveCode);
67
+			$('#customer_name').val(data.data.A_archiveName);
68
+			$('#state').val(data.data.A_archiveState);
69
+		}
70
+	})
71
+}

+ 215 - 0
CallCenterWeb.UI/ArchivesManagement/js/archivesListInfo.js

@@ -0,0 +1,215 @@
1
+/**
2
+ * 物资信息
3
+ * */
4
+
5
+$(document).ready(function() {
6
+
7
+	//获取所属行业
8
+	// helper.getDropList.getlistDropByDic($('#sc_subtrade'), 'KHSSHY');
9
+
10
+	//获取客户信誉等级
11
+	// helper.getDropList.getlistDropByDic($('#sc_layer'), 'KHLayer');
12
+	initTable();
13
+	$("#sc_btns").on('click',initTable);
14
+	$('#btn_add').on('click', btn_add);
15
+});
16
+
17
+//客户信息的列表
18
+function initTable() {
19
+	//先销毁表格
20
+	$('#cusList').bootstrapTable('destroy');
21
+	//初始化表格,动态从服务器加载数据
22
+	$("#cusList").bootstrapTable({
23
+		method: "get", //使用get请求到服务器获取数据
24
+		url: huayi.config.callcenter_url + "archives/GetList", //获取数据的Servlet地址
25
+		contentType: 'application/x-www-form-urlencoded',
26
+		striped: true, //表格显示条纹
27
+		pagination: true, //启动分页
28
+		pageSize: 10, //每页显示的记录数
29
+		pageNumber: 1, //当前第几页
30
+		pageList: [10, 20, 50, 100], //记录数可选列表
31
+		search: false, //是否启用查询
32
+		showColumns: false, //显示下拉框勾选要显示的列
33
+		showRefresh: false, //显示刷新按钮
34
+		sidePagination: "server", //表示服务端请求
35
+		//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
36
+		//设置为limit可以获取limit, offset, search, sort, order
37
+		queryParamsType: "undefined",
38
+		queryParams: function queryParams(params) { //设置查询参数
39
+			var param = {
40
+				PageIndex: params.pageNumber, //int 页码,默认为1	
41
+				PageSize: params.pageSize, //int 条数,默认为10
42
+				A_archiveName: $('#sc_contel').val(),//string 关键词
43
+				token: $.cookie("token")
44
+			};
45
+			return param;
46
+		},
47
+		responseHandler:function(res){
48
+		    return {
49
+		        "total": res.data.total,//总页数
50
+		        "rows": res.data.rows   //数据
51
+		    };
52
+		},
53
+		onLoadSuccess: function() { //加载成功时执行
54
+			//layer.msg("加载成功");
55
+		},
56
+		onLoadError: function() { //加载失败时执行
57
+			//layer.msg("加载数据失败", { time: 1500, icon: 2 });
58
+		}
59
+	});
60
+}
61
+
62
+
63
+//格式化操作
64
+function formatterOprate(val, row) {
65
+	if(row.stateName=='在库'){
66
+		return '<ul class="tool_downs">' +
67
+		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_edit_' + row.id + '" onclick="btn_edit(\'' + row.id + '\')" title="修改">修改</a></li>' +
68
+		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_edit_' + row.id + '" onclick="btn_out( '+ row.id +' )" title="出库">出库</a></li>' +
69
+		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_delete_' + row.id + '" onclick="btn_delete(' + row.id + ')" title="删除">删除</a></li>' +
70
+		'</ul>';
71
+	}else{
72
+		return '<ul class="tool_downs">' +
73
+		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_edit_' + row.id + '" onclick="btn_edit(\'' + row.id + '\')" title="修改">修改</a></li>' +
74
+		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_edit_' + row.id + '" onclick="btn_warehousing(\'' + row.id + '\')" title="入库">入库</a></li>' +
75
+		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_delete_' + row.id + '" onclick="btn_delete(' + row.id + ')" title="删除">删除</a></li>' +
76
+		'</ul>';
77
+	}
78
+	
79
+}
80
+
81
+/**
82
+ * 出库
83
+ */
84
+function btn_out(id,archivesid) {
85
+	layer.confirm('确定出库么?', {
86
+		btn: ['确定', '取消'] //按钮
87
+	}, function() {
88
+		//请求后台数据
89
+		/*发送请求*/
90
+		$.post(huayi.config.callcenter_url + "archives/AddorUpdateinsideOperation", {
91
+			isadd:0,
92
+			archivesid:id,
93
+			Warehousing: '出库',
94
+			token: $.cookie("token")
95
+		}, function(result) {
96
+			result = JSON.parse(result);
97
+			if(result.state.toLowerCase() == "success") {
98
+				layer.msg("出库成功");
99
+				initTable();
100
+			}
101
+		})
102
+	});
103
+}
104
+/**
105
+ * 入库
106
+ */
107
+function btn_warehousing(id,archivesid) {
108
+	layer.confirm('确定入库么?', {
109
+		btn: ['确定', '取消'] //按钮
110
+	}, function() {
111
+		//请求后台数据
112
+		/*发送请求*/
113
+		$.post(huayi.config.callcenter_url + "archives/AddorUpdateinsideOperation", {
114
+			isadd:0,
115
+			archivesid:id,
116
+			Warehousing: '入库',
117
+			token: $.cookie("token")
118
+		}, function(result) {
119
+			result = JSON.parse(result);
120
+			if(result.state.toLowerCase() == "success") {
121
+				layer.msg("入库成功");
122
+				initTable();
123
+			}
124
+		})
125
+	});
126
+}
127
+
128
+/**
129
+ * 添加
130
+ * */
131
+function btn_add() {
132
+	layer.open({
133
+		type: 2,
134
+		title: '添加档案物资信息',
135
+		maxmin: true, //开启最大化最小化按钮
136
+		area: ['80%', '70%'],
137
+		content: '../commonTpl/addOrEditArchivesList.html'
138
+	});
139
+}
140
+
141
+/**
142
+ * 修改
143
+ * editId 客户id
144
+ * */
145
+function btn_edit(editId) {
146
+	layer.open({
147
+		type: 2,
148
+		title: '修改客户信息',
149
+		maxmin: true, //开启最大化最小化按钮
150
+		area: ['80%', '70%'],
151
+		content: '../commonTpl/addOrEditArchivesList.html?edit_id=' + editId
152
+	});
153
+}
154
+
155
+/**
156
+ * 详情
157
+ * editId 客户id
158
+ * */
159
+function btn_details(editId) {
160
+	layer.open({
161
+		type: 2,
162
+		title: '客户信息详情',
163
+		maxmin: true, //开启最大化最小化按钮
164
+		area: ['80%', '90%'],
165
+		content: '../commonTpl/cusDetails.html?edit_id=' + editId
166
+	});
167
+}
168
+
169
+
170
+//导入客户信息
171
+function btn_export() {
172
+	layer.open({
173
+		maxmin: true, //开启最大化最小化按钮
174
+		type: 2,
175
+		content: "../commonTpl/importArchivesList.html", //iframe的url,no代表不显示滚动条
176
+		title: '导入客户信息',
177
+		area: ['50%', '55%'], //宽高
178
+	});
179
+}
180
+
181
+
182
+//删除
183
+function btn_delete(cid) {
184
+	layer.confirm('确定删除当前记录?', {
185
+		icon: 7,
186
+		btn: ['是', '否'] //按钮
187
+	}, function(index) {
188
+		/*执行删除*/
189
+		$.ajax({
190
+			type: "post",
191
+			url: huayi.config.callcenter_url + "archives/DeleteQuestion",
192
+			dataType: 'json',
193
+			async: true,
194
+			data: {
195
+				id: cid,//客户Id,可多选[1,2,3]
196
+				token: $.cookie("token")
197
+			},
198
+			success: function(data) {
199
+				layer.msg("删除成功!");
200
+				$('#cusList').bootstrapTable('refresh');
201
+				layer.close(index);
202
+			}
203
+		});
204
+	});
205
+}
206
+
207
+//导出
208
+$('.btn_export1').click(function() {
209
+	btn_export1(this);
210
+})
211
+function btn_export1(obj) {
212
+	var url = huayi.config.callcenter_url + "archives/ExportExcelarchives?token=" + $.cookie("token");
213
+	url += "&A_archiveName=" + $("#sc_contel").val();
214
+	obj.href = url;
215
+}

+ 85 - 0
CallCenterWeb.UI/ArchivesManagement/js/infoList.js

@@ -0,0 +1,85 @@
1
+/**
2
+ * 物资信息
3
+ * */
4
+
5
+$(document).ready(function() {
6
+	initTable();
7
+});
8
+
9
+//客户信息的列表
10
+function initTable() {
11
+	//先销毁表格
12
+	$('#cusList').bootstrapTable('destroy');
13
+	//初始化表格,动态从服务器加载数据
14
+	$("#cusList").bootstrapTable({
15
+		method: "get", //使用get请求到服务器获取数据
16
+		url: huayi.config.callcenter_url + "archives/GetinsideOperation", //获取数据的Servlet地址
17
+		contentType: 'application/x-www-form-urlencoded',
18
+		striped: true, //表格显示条纹
19
+		pagination: true, //启动分页
20
+		pageSize: 10, //每页显示的记录数
21
+		pageNumber: 1, //当前第几页
22
+		pageList: [10, 20, 50, 100], //记录数可选列表
23
+		search: false, //是否启用查询
24
+		showColumns: false, //显示下拉框勾选要显示的列
25
+		showRefresh: false, //显示刷新按钮
26
+		sidePagination: "server", //表示服务端请求
27
+		//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
28
+		//设置为limit可以获取limit, offset, search, sort, order
29
+		queryParamsType: "undefined",
30
+		queryParams: function queryParams(params) { //设置查询参数
31
+			var param = {
32
+				PageIndex: params.pageNumber, //int 页码,默认为1	
33
+				PageSize: params.pageSize, //int 条数,默认为10
34
+				token: $.cookie("token")
35
+			};
36
+			return param;
37
+		},
38
+		responseHandler:function(res){
39
+		    return {
40
+		        "total": res.data.total,//总页数
41
+		        "rows": res.data.rows   //数据
42
+		    };
43
+		},
44
+		onLoadSuccess: function() { //加载成功时执行
45
+			//layer.msg("加载成功");
46
+		},
47
+		onLoadError: function() { //加载失败时执行
48
+			//layer.msg("加载数据失败", { time: 1500, icon: 2 });
49
+		}
50
+	});
51
+}
52
+
53
+
54
+//格式化操作
55
+function formatterOprate(val, row) {
56
+	return '<ul class="tool_downs">' +
57
+		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_delete_' + row.F_CustomerId + '" onclick="btn_delete(' + row.id + ')" title="删除">删除</a></li>' +
58
+		'</ul>';
59
+}
60
+
61
+//删除
62
+function btn_delete(cid) {
63
+	layer.confirm('确定删除当前记录?', {
64
+		icon: 7,
65
+		btn: ['是', '否'] //按钮
66
+	}, function(index) {
67
+		/*执行删除*/
68
+		$.ajax({
69
+			type: "post",
70
+			url: huayi.config.callcenter_url + "archives/DelinsideOperation",
71
+			dataType: 'json',
72
+			async: true,
73
+			data: {
74
+				id: cid,//客户Id,可多选[1,2,3]
75
+				token: $.cookie("token")
76
+			},
77
+			success: function(data) {
78
+				layer.msg("删除成功!");
79
+				$('#cusList').bootstrapTable('refresh');
80
+				layer.close(index);
81
+			}
82
+		});
83
+	});
84
+}
85
+

+ 85 - 0
CallCenterWeb.UI/ArchivesManagement/js/khOperation.js

@@ -0,0 +1,85 @@
1
+/**
2
+ * 物资信息
3
+ * */
4
+
5
+$(document).ready(function() {
6
+	initTable();
7
+});
8
+
9
+//客户信息的列表
10
+function initTable() {
11
+	//先销毁表格
12
+	$('#cusList').bootstrapTable('destroy');
13
+	//初始化表格,动态从服务器加载数据
14
+	$("#cusList").bootstrapTable({
15
+		method: "get", //使用get请求到服务器获取数据
16
+		url: huayi.config.callcenter_url + "archives/GetCustomerBorrow", //获取数据的Servlet地址
17
+		contentType: 'application/x-www-form-urlencoded',
18
+		striped: true, //表格显示条纹
19
+		pagination: true, //启动分页
20
+		pageSize: 10, //每页显示的记录数
21
+		pageNumber: 1, //当前第几页
22
+		pageList: [10, 20, 50, 100], //记录数可选列表
23
+		search: false, //是否启用查询
24
+		showColumns: false, //显示下拉框勾选要显示的列
25
+		showRefresh: false, //显示刷新按钮
26
+		sidePagination: "server", //表示服务端请求
27
+		//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
28
+		//设置为limit可以获取limit, offset, search, sort, order
29
+		queryParamsType: "undefined",
30
+		queryParams: function queryParams(params) { //设置查询参数
31
+			var param = {
32
+				PageIndex: params.pageNumber, //int 页码,默认为1	
33
+				PageSize: params.pageSize, //int 条数,默认为10
34
+				token: $.cookie("token")
35
+			};
36
+			return param;
37
+		},
38
+		responseHandler:function(res){
39
+		    return {
40
+		        "total": res.data.total,//总页数
41
+		        "rows": res.data.rows   //数据
42
+		    };
43
+		},
44
+		onLoadSuccess: function() { //加载成功时执行
45
+			//layer.msg("加载成功");
46
+		},
47
+		onLoadError: function() { //加载失败时执行
48
+			//layer.msg("加载数据失败", { time: 1500, icon: 2 });
49
+		}
50
+	});
51
+}
52
+
53
+
54
+//格式化操作
55
+function formatterOprate(val, row) {
56
+	return '<ul class="tool_downs">' +
57
+		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_delete_' + row.id + '" onclick="btn_delete(' + row.id + ')" title="删除">删除</a></li>' +
58
+		'</ul>';
59
+}
60
+
61
+//删除
62
+function btn_delete(cid) {
63
+	layer.confirm('确定删除当前记录?', {
64
+		icon: 7,
65
+		btn: ['是', '否'] //按钮
66
+	}, function(index) {
67
+		/*执行删除*/
68
+		$.ajax({
69
+			type: "post",
70
+			url: huayi.config.callcenter_url + "archives/DelCustomerBorrow",
71
+			dataType: 'json',
72
+			async: true,
73
+			data: {
74
+				id: cid,//客户Id,可多选[1,2,3]
75
+				token: $.cookie("token")
76
+			},
77
+			success: function(data) {
78
+				layer.msg("删除成功!");
79
+				$('#cusList').bootstrapTable('refresh');
80
+				layer.close(index);
81
+			}
82
+		});
83
+	});
84
+}
85
+

+ 53 - 0
CallCenterWeb.UI/ArchivesManagement/js/operationRecord.js

@@ -0,0 +1,53 @@
1
+/**
2
+ * 物资信息
3
+ * */
4
+
5
+$(document).ready(function() {
6
+	initTable();
7
+});
8
+
9
+//客户信息的列表
10
+function initTable() {
11
+	//先销毁表格
12
+	$('#cusList').bootstrapTable('destroy');
13
+	//初始化表格,动态从服务器加载数据
14
+	$("#cusList").bootstrapTable({
15
+		method: "get", //使用get请求到服务器获取数据
16
+		url: huayi.config.callcenter_url + "archives/GetOperationlog", //获取数据的Servlet地址
17
+		contentType: 'application/x-www-form-urlencoded',
18
+		striped: true, //表格显示条纹
19
+		pagination: true, //启动分页
20
+		pageSize: 10, //每页显示的记录数
21
+		pageNumber: 1, //当前第几页
22
+		pageList: [10, 20, 50, 100], //记录数可选列表
23
+		search: false, //是否启用查询
24
+		showColumns: false, //显示下拉框勾选要显示的列
25
+		showRefresh: false, //显示刷新按钮
26
+		sidePagination: "server", //表示服务端请求
27
+		//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
28
+		//设置为limit可以获取limit, offset, search, sort, order
29
+		queryParamsType: "undefined",
30
+		queryParams: function queryParams(params) { //设置查询参数
31
+			var param = {
32
+				PageIndex: params.pageNumber, //int 页码,默认为1	
33
+				PageSize: params.pageSize, //int 条数,默认为10
34
+				token: $.cookie("token")
35
+			};
36
+			return param;
37
+		},
38
+		responseHandler:function(res){
39
+		    return {
40
+		        "total": res.data.total,//总页数
41
+		        "rows": res.data.rows   //数据
42
+		    };
43
+		},
44
+		onLoadSuccess: function() { //加载成功时执行
45
+			//layer.msg("加载成功");
46
+		},
47
+		onLoadError: function() { //加载失败时执行
48
+			//layer.msg("加载数据失败", { time: 1500, icon: 2 });
49
+		}
50
+	});
51
+}
52
+
53
+

+ 55 - 0
CallCenterWeb.UI/ArchivesManagement/operationRecord.html

@@ -0,0 +1,55 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<title>信息操作</title>
7
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+		<script src="../Script/Common/huayi.load.js"></script>
9
+		<script src="../Script/Common/huayi.config.js"></script>
10
+		<link href="../css/WorkOrder/Search.css" rel="stylesheet">
11
+		<link href="../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />
12
+		<link href="../css/init.css" rel="stylesheet" />
13
+		<style>
14
+			.tool_bars{
15
+				margin-bottom: 10px;
16
+			}
17
+		</style>
18
+	</head>
19
+
20
+	<body class="gray-bg">
21
+		<div class="daoHang clearfix">
22
+			<div class="dhLeft">
23
+				<sapn><i class="syIcon"></i>位置:
24
+					<a href="javaScript:;" id="ReIndex">首页</a>&gt;
25
+					<a href="javaScript:;">档案物资管理</a>&gt;
26
+					<a href="" class="nowPosition">操作记录表</a>
27
+				</sapn>
28
+			</div>
29
+			<div class="dhRight">
30
+				<a href="#" title="刷新"><i class="fa fa-refresh"></i></a>
31
+			</div>
32
+		</div>
33
+		<div class="wrapper wrapper-content animated fadeInRight">
34
+			<div style="width: 100%;padding: 10px;">
35
+				<table id="cusList" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
36
+					<thead>
37
+						<tr>
38
+							<th data-field="A_archiveName" data-align="center">物资名称</th>
39
+							<th data-field="OperationContent" data-align="center">操作内容</th>
40
+							<th data-field="OperationDate" data-align="center">时间</th>
41
+							<th data-field="Operator" data-align="center">操作人</th>
42
+						</tr>
43
+					</thead>
44
+				</table>
45
+			</div>
46
+			
47
+		</div>
48
+		<script src="../js/laydate/laydate.js"></script>
49
+		<script src="../js/bootstrap-select/js/bootstrap-select.js"></script>
50
+		<script src="../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>
51
+		<script src="js/operationRecord.js"></script>
52
+
53
+	</body>
54
+
55
+</html>

+ 54 - 0
CallCenterWeb.UI/commonTpl/addOrEditArchivesList.html

@@ -0,0 +1,54 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<title>添加或编辑档案物资信息</title>
7
+		<meta name="viewport" content="width=device-width, initial-scale=1.0">
8
+		<link href="../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />
9
+		<script src="../Script/Common/huayi.load.js"></script>
10
+		<script src="../Script/Common/huayi.config.js"></script>
11
+		<link rel="stylesheet" href="../css/customer.css" />
12
+
13
+	</head>
14
+
15
+	<body>
16
+		<div class="container">
17
+			<div class="tab_contents" id="tab_user_contents">
18
+				<ul class="project_items form-horizontal showtabs">
19
+					<li class="form-group">
20
+						<label for="customer_code" class="col-md-2"><b class="text_require">*</b>客户编号</label>
21
+						<div class="col-md-4">
22
+							<input id="customer_code" class="form-control" type="text" autocomplete="off" />
23
+						</div>
24
+					</li>
25
+					<li class="form-group">
26
+						<label for="customer_name" class="col-md-2"><b class="text_require">*</b>物资名称</label>
27
+						<div class="col-md-4">
28
+							<input id="customer_name" class="form-control" type="text" autocomplete="off" />
29
+						</div>
30
+					</li>
31
+					<li class="form-group">
32
+						<label for="customer_notes" class="col-md-2">物资状态</label>
33
+						<div class="col-md-4">
34
+							<select id="state" class="form-control">
35
+								<option value="">请选择物资状态</option>
36
+							</select>
37
+						</div>
38
+					</li>
39
+				</ul>
40
+				<div class="form-group clearfix">
41
+					<div class="col-md-offset-3 col-md-10">
42
+						<button class="project_save btn btn-primary" id="btn_save" type="button">保存</button>
43
+					</div>
44
+				</div>
45
+			</div>
46
+		</div>
47
+		<script src="../js/laydate/laydate.js"></script>
48
+		<script src="../js/bootstrap-select/js/bootstrap-select.js"></script>
49
+		<script src="../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>
50
+		<script src="../Script/Common/regexs.js"></script>
51
+		<script src="../ArchivesManagement/js/addOrEditArchivesList.js"></script>
52
+	</body>
53
+
54
+</html>

BIN
CallCenterWeb.UI/commonTpl/archivesList.xls


+ 229 - 0
CallCenterWeb.UI/commonTpl/importArchivesList.html

@@ -0,0 +1,229 @@
1
+<!DOCTYPE html>
2
+<html>
3
+
4
+	<head>
5
+		<meta charset="UTF-8">
6
+		<link href="../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />
7
+		<script src="../Script/Common/huayi.load.js"></script>
8
+		<script src="../Script/Common/huayi.config.js"></script>
9
+		<title>导入档案物资信息</title>
10
+		<style>
11
+			.btn-success {
12
+				color: #fff;
13
+				background-color: #1ab394;
14
+				border-color: #4cae4c;
15
+				border-radius: 4px;
16
+				cursor: pointer;
17
+			}
18
+			
19
+			.btn-success.active,
20
+			.btn-success:active,
21
+			.btn-success:focus,
22
+			.btn-success:hover {
23
+				border-color: #4cae4c;
24
+				background-color: #1ab394;
25
+			}
26
+			
27
+			.btn-success[disabled],
28
+			.btn-success[disabled]:active,
29
+			.btn-success[disabled]:focus,
30
+			.btn-success[disabled]:hover {
31
+				background-color: #1ab394;
32
+			}
33
+			
34
+			#importNum {
35
+				width: 130px;
36
+				margin: 60px auto 0 auto;
37
+			}
38
+			
39
+			.progress {
40
+				width: 80%;
41
+				margin: 20px auto 0 auto;
42
+				display: none;
43
+			}
44
+			
45
+			div.drop_down {
46
+				position: relative;
47
+				line-height: 34px;
48
+			}
49
+			
50
+			.drop_down .caret {
51
+				position: absolute;
52
+				right: 10px;
53
+				top: 15px;
54
+			}
55
+			
56
+			.form-group {
57
+				margin-bottom: 10px!important;
58
+			}
59
+			
60
+			@media (min-width: 768px) {
61
+				.drop_down .form-control {
62
+					width: 818px;
63
+				}
64
+			}
65
+		</style>
66
+	</head>
67
+
68
+	<body>
69
+
70
+		<div style="padding: 10px; margin-bottom: 20px;">
71
+			<div class="alert alert-info" role="alert">
72
+				<span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span>
73
+				<span class="sr-only">tips:</span> 上传文件需要严格按照下载的EXCEL模板进行填写!上传后点击导入即可!
74
+			</div>
75
+			<div class="form-inline clearfix">
76
+				<div class="form-group">
77
+					<a id="excelMod" class="btn btn-success form-control" title="点击下载EXCEL模板" href="javascript:void(0)" onclick="ExcelMod()" rel="nofollow">下载EXCEL模板</a>
78
+				</div>
79
+				<div class="form-group">
80
+					<input class="hidden" type="file" id="upFile" name="upFile" accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel,application/x-xls,application/x-xlsx" />
81
+					<input class="form-control btn btn-success" title="点击上传Excel文件" type="button" value="上传Excel文件" id="upFileExcel" />
82
+					<span class="excelName"></span>
83
+				</div>
84
+			</div>
85
+			<div class="progress">
86
+				<div class="progress-bar progress-bar-striped" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100">
87
+
88
+				</div>
89
+			</div>
90
+			<div class="form-group text-center">
91
+				<input type="button" id="importNum" class="form-control btn btn-success" value="导入" />
92
+			</div>
93
+		</div>
94
+
95
+		<script src="../js/bootstrap-select/js/bootstrap-select.js"></script>
96
+		<script src="../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>
97
+		<script>
98
+			var percents = 0; //长传文件进度值
99
+			$(document).ready(function() {
100
+				//上传EXCEL文件
101
+				$("#upFileExcel").click(function() {
102
+					$("#upFile").trigger("click");
103
+				});
104
+				$("#upFile").change(function() {
105
+					var Files = document.getElementById("upFile").files;
106
+					$('.excelName').html(Files[0].name); //文件名称
107
+				});
108
+				$("#importNum").click(function() {
109
+					uploads();
110
+				});
111
+
112
+			});
113
+			//下载模板
114
+			function ExcelMod() {
115
+			    window.location.href = "archivesList.xls";
116
+			}
117
+
118
+			//上传Excel文件 模拟实时进度
119
+			function uploads() {
120
+				var txtName = $('.excelName').text();
121
+				if(txtName == '') {
122
+					layer.confirm('你还没有上传文件', {
123
+						icon: 2,
124
+						btn: ['确定']
125
+					});
126
+					return;
127
+				}
128
+				//一般情况下,excel后缀是".xls",在2007以及以后的版本中又增加了".xlsx"。excel的模板文件后缀名是".xlt",启动宏的工作簿后缀名是".xlsm"。
129
+				if(txtName.indexOf('.xls') != -1 ||
130
+					txtName.indexOf('.xlsx') != -1 ||
131
+					txtName.indexOf('.xlt') != -1 ||
132
+					txtName.indexOf('.xlsm') != -1
133
+				) {
134
+					var formData = new FormData();
135
+					var Files = document.getElementById("upFile").files;
136
+					formData.append("upFile", Files[0]); //是	HttpPostedFile	Excel文件
137
+					formData.append("token", $.cookie("token"));
138
+					$.ajax({
139
+						url: huayi.config.callcenter_url + "archives/ImportExcelarchives",
140
+						type: "POST",
141
+						data: formData,
142
+						/**
143
+						 *必须false才会自动加上正确的Content-Type
144
+						 */
145
+						contentType: false,
146
+						/**
147
+						 * 必须false才会避开jQuery对 formdata 的默认处理
148
+						 * XMLHttpRequest会对 formdata 进行正确的处理
149
+						 */
150
+						processData: false,
151
+						xhr: function() {
152
+							var xhr = jQuery.ajaxSettings.xhr();
153
+							xhr.upload.onload = function() {
154
+								updateProgress(88);
155
+							}
156
+							xhr.upload.onprogress = function(ev) {
157
+								updateProgress(70);
158
+							}
159
+							return xhr;
160
+						},
161
+						beforeSend: function(request) {
162
+							$('.progress').show();
163
+							$("#importNum").attr("disabled", true);
164
+							$("#importNum").val('导入中...');
165
+							updateProgress(50);
166
+
167
+						},
168
+						success: function(result) {
169
+							updateProgress(100);
170
+							var r = $.parseJSON(result);
171
+							$("#importNum").attr("disabled", false);
172
+							$("#importNum").val('导入');
173
+							if(r.state.toLowerCase() == "success") {
174
+								var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
175
+								parent.layer.close(index); //再执行关闭
176
+								parent.$('#cusList').bootstrapTable('refresh');
177
+								parent.layer.alert(r.message, {
178
+									icon: 1,
179
+									btn: ['确定']
180
+								});
181
+
182
+							}
183
+						},
184
+						error: function(textStatus) {
185
+							percents = 0;
186
+							$('.progress').hide();
187
+							layer.confirm('网络繁忙,请稍后再试...', {
188
+								btn: ['确定'] //按钮
189
+							});
190
+							$("#importNum").attr("disabled", false);
191
+							$("#importNum").val('导入');
192
+						},
193
+						complete: function(XMLHttpRequest, textStatus) {
194
+							percents = 0;
195
+							$('.progress').hide();
196
+							if(textStatus == 'timeout') {
197
+								var xmlhttp = window.XMLHttpRequest ? new window.XMLHttpRequest() : new ActiveXObject("Microsoft.XMLHttp");
198
+								xmlhttp.abort();
199
+								layer.confirm('网络超时,请稍后再试...', {
200
+									btn: ['确定'] //按钮
201
+								});    
202
+							}
203
+							$("#importNum").attr("disabled", false);
204
+							$("#importNum").val('导入');
205
+						},
206
+					});
207
+
208
+				} else {
209
+					layer.confirm('请上传EXCEL文件', {
210
+						icon: 2,
211
+						btn: ['确定']
212
+					});
213
+					return;
214
+				}
215
+			}
216
+
217
+			//更新进度条
218
+			function updateProgress(p) {
219
+				while(percents < p) {
220
+					percents++;
221
+					$('.progress-bar').css('width', percents + '%');
222
+					$('.progress-bar').text(percents + '%');
223
+				}
224
+
225
+			}
226
+		</script>
227
+	</body>
228
+
229
+</html>

+ 146 - 0
WeChat/content/borrowDetail.html

@@ -0,0 +1,146 @@
1
+<!doctype html>
2
+<html>
3
+	<head>
4
+		<meta charset="UTF-8">
5
+		<title>工单详情</title>
6
+		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
7
+		<meta name="apple-mobile-web-app-capable" content="yes">
8
+		<meta name="apple-mobile-web-app-status-bar-style" content="black">
9
+		<link href="../css/mui.css" rel="stylesheet" />
10
+		<link href="../css/mui.picker.css" rel="stylesheet" />
11
+		<link href="../css/mui.poppicker.css" rel="stylesheet" />
12
+		<link href="../css/iconfont.css" rel="stylesheet" />
13
+		<link href="css/serveDetail.css" rel="stylesheet" />
14
+	</head>
15
+	<style>
16
+		#GDgz{
17
+			background: #FFFFFF;
18
+		}
19
+		/*.mui_btn1{display: none;}*/
20
+		.mui_btn1_tit{
21
+			padding: 10px 0 0 10px;
22
+			font-size: 14px;
23
+		}
24
+		.mui-btn-block{
25
+			padding: 5px 10px;
26
+			font-size: 14px;
27
+		}
28
+		.pop_up_bj{
29
+			top: 0px;
30
+			background: #000000;
31
+			filter:alpha(opacity=50);   
32
+		  	-moz-opacity:0.5;   
33
+		  	-khtml-opacity: 0.5;   
34
+		  	opacity: 0.5;
35
+		  	position: fixed;
36
+		  	z-index: 333;
37
+		  	width: 100%;
38
+		  	height: 100%;
39
+		  	display: none;   
40
+		}
41
+		.mui-left{
42
+			float: left;
43
+			clear: none;
44
+		}
45
+		.mui-radio input[type=radio]:before {
46
+		    font-size: 20px;
47
+		    vertical-align: middle;
48
+		}
49
+		.mui-radio.mui-left input[type=radio] {
50
+		    line-height: 24px!important;
51
+		}
52
+		.mui-input-row label{
53
+			padding: 11px 0px 11px 15px;
54
+			
55
+			
56
+		}
57
+		.labelText{
58
+			padding-right: 0px !important;
59
+    		padding-left: 45px !important;
60
+		}
61
+		.borrow,
62
+		.BtnReutrn,
63
+		.warehousing,
64
+		.out{
65
+			display: none;
66
+		}
67
+	</style>
68
+	<body>
69
+		<div class="mui-nav" id="mNavbar">
70
+			<a class="mui-icon mui-icon-arrowleft returnBcak" ></a>
71
+			档案资料详情
72
+		</div>
73
+		<div class="mui-content" id="mContent" style="margin-top: 54px;">
74
+			<ul class="mui-table-view mui-table-view-ul" id="mContentList">
75
+				<li class="mui-table-view-cell mui-table-view-li">
76
+					<div class="mui-input-row">
77
+						<label class="label font-color5">物资名称</label>
78
+						<div class="mui-radio mui-right radio_box">
79
+							<label class="font-color6" id="archiveName"></label>
80
+						</div>
81
+					</div>
82
+				</li>
83
+				<li class="mui-table-view-cell mui-table-view-li">
84
+					<div class="mui-input-row">
85
+						<label class="label font-color5">物资状态</label>
86
+						<div class="mui-radio mui-right radio_box">
87
+							<label class="font-color6" id="archiveState"></label>
88
+						</div>
89
+					</div>
90
+				</li>
91
+				<li class="mui-table-view-cell mui-table-view-li">
92
+					<div class="mui-input-row">
93
+						<label class="label font-color5">变更时间</label>
94
+						<div class="mui-radio mui-right radio_box">
95
+							<label class="font-color6" id="OperationDate"></label>
96
+						</div>
97
+					</div>
98
+				</li>
99
+				<li class="mui-table-view-cell mui-table-view-li">
100
+					<div class="mui-input-row">
101
+						<label class="label font-color5">操作人</label>
102
+						<div class="mui-radio mui-right radio_box">
103
+							<label class="font-color6" id="archivePeople"></label>
104
+						</div>
105
+					</div>
106
+				</li>
107
+				<li class="mui-table-view-cell mui-table-view-li">
108
+					<div class="mui-input-row" style="margin-left: 8px;">
109
+						变更记录:
110
+						<p id="OperationContent" style="text-indent: 2em;"></p>
111
+					</div>
112
+				</li>
113
+			</ul>
114
+			<ul class="mui-table-view ">
115
+				<h4 class="mui-ellipsis size-16 mui_btn1_tit">操作按钮:</h4>
116
+				<div class="type1">
117
+					<div class="mui_btn1 company">
118
+						<li class=" mui-media mui-col-xs-3">
119
+							<button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block borrow">借阅</button>
120
+						</li>
121
+						<li class="mui-media mui-col-xs-3 ">
122
+							<button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block BtnReutrn">归还</button>
123
+						</li>
124
+					</div>
125
+					<div class="mui_btn1 staff">
126
+						<li class="mui-media mui-col-xs-3 ">
127
+							<button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block out">出库</button>
128
+						</li>
129
+						<li class="mui-media mui-col-xs-3 ">
130
+							<button type="button" data-loading-text="提交中" class="mui-btn mui-btn-primary mui-btn-block warehousing">入库</button>
131
+						</li>
132
+					</div>
133
+				</div>
134
+			</ul>
135
+		</div>
136
+		<div class="pop_up_bj"></div>
137
+		<script src="../js/mui.min.js?"></script>
138
+		<script src="../js/mui.picker.js"></script>
139
+		<script src="../js/mui.poppicker.js"></script>
140
+		<script src="../js/jquery.min.js"></script>
141
+		<script src="../Script/Common/huayi.config.js"></script>
142
+		<script src="../Script/Common/huayi.http.js"></script>
143
+		<script src="js/borrowDetail.js"></script>
144
+	</body>
145
+
146
+</html>

+ 71 - 0
WeChat/content/borrowList.html

@@ -0,0 +1,71 @@
1
+<!DOCTYPE html>
2
+<html>
3
+	<head>
4
+		<meta charset="utf-8">
5
+		<title>工单列表</title>
6
+		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
7
+		<meta name="apple-mobile-web-app-capable" content="yes">
8
+		<meta name="apple-mobile-web-app-status-bar-style" content="black">
9
+		<link rel="stylesheet" href="../css/mui.css">
10
+		<link rel="stylesheet" href="../css/iconfont.css" />
11
+		<link rel="stylesheet" href="css/serve.css" />
12
+		<style>
13
+			.tab_color{color: #2cc6a7 !important;}
14
+			#OA_task{
15
+				margin-top: 15px !important;
16
+			}
17
+			.cont-margin{
18
+				border-top: 1px solid #CCCCCC;
19
+			}
20
+			.headerBorrow{
21
+				height: 45px;
22
+				background-color: #FFFFFF !important;
23
+			}
24
+			#keyword{
25
+				padding: 10px 0 0 5px;
26
+				height: 40px;
27
+				width: 75%;
28
+				margin: 10px 0 0 10px;
29
+				border-radius: 5px;
30
+			}
31
+			.search{
32
+				margin: 10px 10px 0 0px;
33
+				padding: 10px 0;
34
+				height: 40px;
35
+				float: right;
36
+				width: 15%;
37
+				text-align: center;
38
+			}
39
+			body{
40
+				background-color: #FFFFFF !important;
41
+			}
42
+			#pullrefresh{
43
+				margin-top: 60px;
44
+			}
45
+			.mui-content{
46
+				background-color: #FFFFFF;
47
+			}
48
+		</style>
49
+	</head>
50
+	<body>
51
+		<!--页面主内容区开始-->
52
+		<div class="headerBorrow">
53
+			<!--<a class="mui-icon mui-icon-arrowleft" href="company.html"></a>
54
+			工单列表-->
55
+			<input type="" name="" id="keyword" value="" placeholder="请输入内容"/>
56
+			<button type="button"  class="mui-btn mui-btn-primary mui-btn-block search">搜索</button>
57
+		</div>
58
+		<div class="mui-content mui-scroll-wrapper" id="pullrefresh">
59
+			<div class="mui-scroll">
60
+				<ul class="mui-table-view" id="OA_task">
61
+					
62
+				</ul>
63
+			</div>
64
+		</div>
65
+	</body>
66
+	<script src="../js/mui.min.js"></script>
67
+	<script src="../js/jquery.min.js"></script>
68
+	<script src="../js/huayi.http.js"></script>
69
+	<script src="../Script/Common/huayi.config.js"></script>
70
+	<script src="js/borrowList.js"></script>
71
+</html>

+ 145 - 0
WeChat/content/js/borrowDetail.js

@@ -0,0 +1,145 @@
1
+mui.init({})
2
+var id = helper.request.queryString("id");
3
+var state = helper.request.queryString("type");
4
+var staff = helper.request.queryString("typeStaff");
5
+var openid = helper.cookies.get("openid");
6
+//var openid = "oXF5e1mWpX5DajW5_yjNLPKb8ThE";
7
+var roleCode = helper.cookies.get("RoleCode");
8
+var typeUser = helper.cookies.get("typeUser");
9
+var backType=0,turn=1;
10
+//var staff=1;
11
+//var state=1;
12
+	// 显示导航
13
+	$('#mNavbar').show();
14
+	$('#mContent').css('marginTop', '45px');	
15
+	$('#mContentList').css('marginTop', '10px');	
16
+//if(typeUser==1){
17
+//	$(".typeStaff").show();
18
+//}else{
19
+//	$(".company").show();
20
+//}
21
+function formatterDealDetail(val, row) {
22
+	return str;
23
+}
24
+$(function () {
25
+	Ajax();
26
+	//返回上页
27
+	$('.returnBcak').click(function(){
28
+		mui.back()
29
+	})
30
+})
31
+//借阅
32
+$(".borrow").click(function(){
33
+	var btnArray = ['否', '是'];
34
+	mui.confirm('确定借阅吗?', '提示', btnArray, function(f) {
35
+		if(f.index == 1) {
36
+			$.ajax({
37
+				type: "post",
38
+				dataType: 'json',
39
+				url: huayi.config.callcenter_url + 'archives/AddorUpdateCustomerBorrow',
40
+				async: true,
41
+				data: {
42
+					isadd:0,
43
+					archivesid: id, //否	strubg	工单编号
44
+					openid: openid, //微信openid 测试用
45
+					BorrowOreturn:'借阅'
46
+				},
47
+				success: function(data) {
48
+					if(data.state == "success") {
49
+						mui.toast('操作成功');
50
+						window.location.href = "borrowList.html?Itype=1";
51
+					} else {
52
+						mui.toast(data.message);
53
+					}
54
+				}
55
+			});
56
+		} else {
57
+			mui.toast("取消");
58
+		}
59
+	})
60
+})
61
+//归还
62
+$(".BtnReutrn").click(function(){
63
+	var btnArray = ['否', '是'];
64
+	mui.confirm('确定归还吗?', '提示', btnArray, function(f) {
65
+		if(f.index == 1) {
66
+			$.ajax({
67
+				type: "post",
68
+				dataType: 'json',
69
+				url: huayi.config.callcenter_url + 'archives/AddorUpdateCustomerBorrow',
70
+				async: true,
71
+				data: {
72
+					isadd:0,
73
+					archivesid: id, //否	strubg	工单编号
74
+					openid: openid, //微信openid 测试用
75
+					BorrowOreturn:'归还'
76
+				},
77
+				success: function(data) {
78
+					if(data.state == "success") {
79
+						mui.toast('操作成功');
80
+						window.location.href = "borrowList.html?Itype=1";
81
+					} else {
82
+						mui.toast(data.message);
83
+					}
84
+				}
85
+			});
86
+		} else {
87
+			mui.toast("取消");
88
+		}
89
+	})
90
+})
91
+$(".allot").click(function(){ 
92
+	window.location.href = "redeploy.html?id=" + id + '&itype=' + state;
93
+})
94
+function Ajax() {
95
+	$.ajax({
96
+		url: huayi.config.callcenter_url + 'archives/GetModelarchives',
97
+		data: {
98
+			id: id, //工单编号
99
+			openid: openid, //微信openid,
100
+//			openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE',
101
+		},
102
+		async: true,
103
+		dataType: 'json',
104
+		type: 'get', //HTTP请求类型
105
+		success: function(data) {
106
+			if(data.state.toLowerCase() == "success") {
107
+				var result = data.data
108
+				if(typeUser==5){
109
+					if(result.stateName=='借阅中'){
110
+						$('.BtnReutrn').show()
111
+						$('.borrow').hide()
112
+						$('.out').hide()
113
+						$('.warehousing').hide()
114
+					}else{
115
+						$('.BtnReutrn').hide()
116
+						$('.borrow').show()
117
+						$('.out').hide()
118
+						$('.warehousing').hide()
119
+					}
120
+				}else{
121
+					if(result.stateName=='在库'){
122
+						$('.BtnReutrn').hide()
123
+						$('.borrow').hide()
124
+						$('.out').show()
125
+						$('.warehousing').hide()
126
+					}else{
127
+						$('.BtnReutrn').hide()
128
+						$('.borrow').hide()
129
+						$('.out').hide()
130
+						$('.warehousing').show()
131
+					}
132
+				}
133
+				
134
+				$("#archiveName").text(result.A_archiveName); //物资名称
135
+				$("#archiveState").text(result.stateName); //工单类型
136
+				$("#OperationDate").text(result.OperationDate); //变更时间
137
+				$("#archivePeople").text(result.A_archivePeople); //操作人
138
+				$("#OperationContent").text(result.OperationContent); //客户姓名
139
+			}
140
+		},
141
+		error: function(xhr, type, errorThrown) {
142
+			//异常处理;
143
+		}
144
+	})
145
+}

+ 139 - 0
WeChat/content/js/borrowList.js

@@ -0,0 +1,139 @@
1
+mui.init({
2
+	swipeBack: false,
3
+	pullRefresh: {
4
+		container: '#pullrefresh',
5
+		up: {
6
+			contentrefresh: "正在加载...", //可选,正在加载状态时,上拉加载控件上显示的标题内容
7
+			contentnomore: '没有更多数据了', //可选,请求完毕若没有更多数据时显示的提醒内容;
8
+			callback: pullupRefresh
9
+		}
10
+	}
11
+});
12
+var state=1;
13
+//var Staff=1;
14
+var openid = helper.cookies.get("openid");
15
+var roleCode = helper.cookies.get("RoleCode");
16
+var typeUser = helper.cookies.get("typeUser");
17
+var Itype = helper.request.queryString("Itype");
18
+var turn = helper.request.queryString("turn");
19
+var page = 1; //页数
20
+var pageSize = 10; //每页显示条目
21
+var total;
22
+//var turn=1;
23
+//var typeUser=5;
24
+//var openid = "oXF5e1mWpX5DajW5_yjNLPKb8ThE";
25
+$(function () {
26
+	$('.search').click(function(){
27
+		Ajax();
28
+	})
29
+	if (turn) {
30
+		$(".mui-nav").show();
31
+		$(".cont-margin").css("margin-top","44px");
32
+		$("#OA_task").css("margin-top","88px");
33
+	}else{
34
+		$("#OA_task").css("margin-top","0px");
35
+		$(".cont-margin").css("margin-top","44px");
36
+	}
37
+	if(typeUser==5){
38
+		$("#OA_task").css("margin-top","45px");
39
+		state="";
40
+		Staff=1;
41
+		Ajax();
42
+	}else if(typeUser==1){
43
+		$("#OA_task").css("margin-top","85px");
44
+		state=1;
45
+		Staff="";
46
+		Ajax();
47
+	}
48
+})
49
+function Ajax() {
50
+	//$(".order").remove();
51
+	$.ajax({
52
+		url: huayi.config.callcenter_url + 'archives/GetList',
53
+		data: {
54
+			openid: openid, //微信openid,
55
+//			openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE',
56
+			PageIndex:page,
57
+			PageSize:pageSize,
58
+			A_archiveName:$('#keyword').val()
59
+		},
60
+		async: true,
61
+		dataType: 'json',
62
+		type: 'get', //HTTP请求类型
63
+		success: function(data) {
64
+			if(data.data.rows && data.data.rows.length > 0) {
65
+				$(".noinfor").text("");
66
+				$("#OA_task").empty();
67
+				$(data.data.rows).each(function(i, n) {
68
+					$('<li class="mui-table-view-cell order" data-index="' + n.id + '">' +
69
+						'<div class="mui-table">' +
70
+						'<div class="mui-table-cell mui-col-xs-8">' +
71
+						'<h4 class="mui-ellipsis">' + n.A_archiveName +
72
+						'</h4><h5>' + n.OperationDate +
73
+						'</h5></div>'+
74
+						'<div class="mui-table-cell mui-col-xs-4 mui-text-right">'+
75
+						'<span class="mui-h5">'+n.stateName+
76
+						'</span></div></div></li>').appendTo('#OA_task');
77
+				});
78
+				//工单跳转
79
+				$('.order').on('tap', function() {
80
+					var index = $(this).attr('data-index');
81
+					window.location.href = "borrowDetail.html?id=" + index;
82
+				});
83
+			} else {
84
+				$(".noinfor").text("暂无信息");
85
+			}
86
+		},
87
+		error: function(xhr, type, errorThrown) {
88
+			//异常处理;
89
+		}
90
+	})
91
+
92
+}
93
+//下拉刷新
94
+function pullupRefresh() {
95
+	setTimeout(function() {
96
+		mui('#pullrefresh').pullRefresh().endPullupToRefresh((page++ >= Math.ceil(total / 10)));
97
+		$.ajax({
98
+			url: huayi.config.callcenter_url + 'archives/GetList',
99
+			data: {
100
+				openid:openid,
101
+//				openid: 'oXF5e1mWpX5DajW5_yjNLPKb8ThE',
102
+				PageIndex:page,
103
+				PageSize:pageSize,
104
+				A_archiveName:$('#keyword').val()
105
+			},
106
+			async: true,
107
+			dataType: 'json',
108
+			type: 'get', //HTTP请求类型
109
+			success: function(data) {
110
+				total = data.data.total;
111
+				if(data.data.rows && data.data.rows.length > 0) {
112
+					$(data.data.rows).each(function(i, n) {
113
+						$('<li class="mui-table-view-cell order" data-index="' + n.id + '">' +
114
+							'<div class="mui-table">' +
115
+							'<div class="mui-table-cell mui-col-xs-8">' +
116
+							'<h4 class="mui-ellipsis">' + n.A_archiveName +
117
+							'</h4><h5>' + n.OperationDate +
118
+							'</h5></div>'+
119
+							'<div class="mui-table-cell mui-col-xs-4 mui-text-right">'+
120
+							'<span class="mui-h5">'+n.stateName+
121
+							'</span></div></div></li>').appendTo('#OA_task');
122
+					});
123
+					//工单跳转
124
+					$('.order').on('tap', function() {
125
+						var index = $(this).attr('data-index');
126
+						window.location.href = "borrowDetail.html?id=" + index;
127
+
128
+					});
129
+				}
130
+                   
131
+			},
132
+			error: function(xhr, type, errorThrown) {
133
+				//异常处理;
134
+              
135
+			}
136
+		})
137
+
138
+	}, 1000);
139
+}

+ 6 - 0
WeChat/login.html

@@ -135,6 +135,9 @@
135 135
 					case "GDXQ":
136 136
 						window.location.replace("content/orderDetail.html");
137 137
 						break; //工单详情
138
+					case "WZDA":
139
+						window.location.replace("content/borrowList.html");
140
+						break; //物资档案列表
138 141
 					default:
139 142
 						window.location.replace("error.html");
140 143
 						break;
@@ -163,6 +166,9 @@
163 166
 					case "GDXQ":
164 167
 						window.location.replace("content/orderDetail.html");
165 168
 						break; //工单详情
169
+					case "WZDA":
170
+						window.location.replace("content/borrowList.html");
171
+						break; //物资档案列表
166 172
 					default:
167 173
 						window.location.replace("error.html");
168 174
 						break;