Kaynağa Gözat

物资信息列表

zhaomin 4 yıl önce
ebeveyn
işleme
203e3bdd60

+ 9 - 0
CallCenterWeb.UI/.project

@@ -105,5 +105,14 @@
105 105
 				<arguments>1.0-name-matches-false-false-node_modules</arguments>
106 106
 			</matcher>
107 107
 		</filter>
108
+		<filter>
109
+			<id>1572509296496</id>
110
+			<name></name>
111
+			<type>26</type>
112
+			<matcher>
113
+				<id>org.eclipse.ui.ide.multiFilter</id>
114
+				<arguments>1.0-name-matches-false-false-node_modules</arguments>
115
+			</matcher>
116
+		</filter>
108 117
 	</filteredResources>
109 118
 </projectDescription>

+ 4 - 6
CallCenterWeb.UI/ArchivesManagement/ArchivesList.html

@@ -35,9 +35,8 @@
35 35
 				<div class="pull-left">
36 36
 					<div class="form-inline">
37 37
 						<div class="form-group">
38
-							<!-- <input type="text" class="form-control" id="sc_contel" placeholder="请输入物资名称" /> -->
38
+							<!--<input type="text" class="form-control" id="sc_contel" placeholder="请输入物资名称" />-->
39 39
 							<select class="form-control input-sm selectpicker" id="companyName" data-live-search="true">
40
-								<!-- <option value="">请选择公司名称</option> -->
41 40
 							</select>
42 41
 						</div>
43 42
 					</div>
@@ -59,11 +58,11 @@
59 58
 							<!--<th data-field="F_CustomerCode" data-align="center">客户编号</th>-->
60 59
 							<th data-field="companyname" data-align="center">公司名称</th>
61 60
 							<th data-field="countnum" data-align="center">物资数量</th>
62
-							<!-- <th data-field="stateName" data-align="center">物资状态</th>
61
+							<!--<th data-field="stateName" data-align="center">物资状态</th>
63 62
 							<th data-field="OperationDate" data-align="center">最近一次变更时间</th>
64 63
 							<th data-field="A_archivePeople" data-align="center">操作人</th>
65
-							<th data-field="OperationContent" data-align="center">变更记录</th>
66
-							<th data-field="F_CustomerId" data-formatter="formatterOprate" data-align="center">操作</th> -->
64
+							<th data-field="OperationContent" data-align="center">变更记录</th>-->
65
+							<th data-field="F_CustomerId" data-formatter="formatterOprate" data-align="center">操作</th>
67 66
 						</tr>
68 67
 					</thead>
69 68
 				</table>
@@ -74,7 +73,6 @@
74 73
 		<script src="../js/bootstrap-select/js/bootstrap-select.js"></script>
75 74
 		<script src="../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>
76 75
 		<script src="js/archivesListInfo.js"></script>
77
-
78 76
 	</body>
79 77
 
80 78
 </html>

+ 19 - 18
CallCenterWeb.UI/ArchivesManagement/js/addOrEditArchivesList.js

@@ -15,6 +15,7 @@ $(function() {
15 15
 	if(editId){
16 16
 		getArchivesDetail(editId);
17 17
 		$('#state').attr('disabled',true)
18
+		$("#customer_code").attr('disabled',true);
18 19
 	}else{
19 20
 		$('#state').attr('disabled',false)
20 21
 	}
@@ -28,19 +29,20 @@ $(function() {
28 29
 		} else {
29 30
 			var isadd = 0
30 31
 			editId = ''
32
+			if(!$('#customer_code').val()){
33
+				layer.msg('请输入客户编号!')
34
+				return
35
+			}
36
+			if(!$('#customer_name').val()){
37
+				layer.msg('请输入物资名称!')
38
+				return
39
+			}
40
+			if(!$('#state').val()){
41
+				layer.msg('请选择物资状态!')
42
+				return
43
+			}
31 44
 		}
32
-		if(!$('#customer_code').val()){
33
-			layer.msg('请输入客户编号!')
34
-			return
35
-		}
36
-		if(!$('#customer_name').val()){
37
-			layer.msg('请输入物资名称!')
38
-			return
39
-		}
40
-		if(!$('#state').val()){
41
-			layer.msg('请选择物资状态!')
42
-			return
43
-		}
45
+		
44 46
 		$.post(huayi.config.callcenter_url + 'archives/AddorUpdateArchivesNew', {
45 47
 			isadd: isadd,
46 48
 			id: editId,
@@ -70,17 +72,16 @@ function WZstate(obj) {
70 72
 		obj.append('<option value="' + n.id + '">' + n.stateName + '</option>');
71 73
 	})
72 74
 }
73
-
74 75
 //获取详情
75 76
 function getArchivesDetail(editId) {
76
-	$.getJSON(huayi.config.callcenter_url + "archives/GetModelarchives", {
77
-		id: editId,
77
+	$.getJSON(huayi.config.callcenter_url + "archives/getArchivesById", {
78
+		archivesId: editId,
78 79
 		token: $.cookie("token")
79 80
 	}, function(data) {
80 81
 		if(data.state=='success'){
81
-			$('#customer_code').val(data.data.A_archiveCode);
82
-			$('#customer_name').val(data.data.A_archiveName);
83
-			$('#state').val(data.data.A_archiveState);
82
+			$('#customer_code').val(data.data[0].A_archiveCode);
83
+			$('#customer_name').val(data.data[0].A_archiveName);
84
+			$('#state').val(data.data[0].A_archiveState);
84 85
 		}
85 86
 	})
86 87
 }

+ 77 - 33
CallCenterWeb.UI/ArchivesManagement/js/archivesListInfo.js

@@ -59,42 +59,49 @@ function initTable() {
59 59
 	});
60 60
 }
61 61
 
62
-//选择公司名称
63
-$.getJSON(huayi.config.callcenter_url + "archives/getCompanyName", {
64
-		token: $.cookie("token"),
65
-		name:$("#companyName").val()
66
-	}, function(res) {
67
-		console.log(res);
68
-		if(res.state.toLowerCase() == "success") {
69
-			companyNameList = res.data.row;
70
-			CompanyName($("#companyName"));
71
-		}
72
-	});
73
-function CompanyName(obj) {
62
+//搜索公司名称
63
+$.getJSON(huayi.config.callcenter_url + "archives/getCompanyName",{
64
+	token:$.cookie("token"),
65
+	name:$("#companyName").val()
66
+},function(res){
67
+	console.log(res);
68
+	if(res.state=="success"){
69
+		companyNameList=res.data.rows;
70
+		CompanyName($("#companyName"));
71
+	}
72
+})
73
+function CompanyName(obj){
74 74
 	obj.empty();
75 75
 	obj.append('<option value="">请选择公司名称</option>');
76
-	$(companyNameList).each(function(i, n) {
77
-		console.log(i,n);
78
-		obj.append('<option value="' + i + '">' + n + '</option>');
76
+	$(companyNameList).each(function(i,n) {
77
+		obj.append('<option value="' + i+ '">' + n + '</option>');
79 78
 	})
80
-}	
81
-
79
+}
82 80
 
83 81
 //格式化操作
84 82
 function formatterOprate(val, row) {
85
-	if(row.stateName=='在库'){
86
-		return '<ul class="tool_downs">' +
87
-		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_edit_' + row.id + '" onclick="btn_edit(\'' + row.id + '\')" title="修改">修改</a></li>' +
88
-		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_edit_' + row.id + '" onclick="btn_out( '+ row.id +' )" title="出库">出库</a></li>' +
89
-		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_delete_' + row.id + '" onclick="btn_delete(' + row.id + ')" title="删除">删除</a></li>' +
90
-		'</ul>';
91
-	}else{
92
-		return '<ul class="tool_downs">' +
93
-		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_edit_' + row.id + '" onclick="btn_edit(\'' + row.id + '\')" title="修改">修改</a></li>' +
94
-		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_edit_' + row.id + '" onclick="btn_warehousing(\'' + row.id + '\')" title="入库">入库</a></li>' +
95
-		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_delete_' + row.id + '" onclick="btn_delete(' + row.id + ')" title="删除">删除</a></li>' +
96
-		'</ul>';
97
-	}
83
+	console.log(val, row);
84
+	return '<ul class="tool_downs">' +
85
+		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_watch_' + row.companyname+ '" onclick="btn_watch(\'' + row.companyname + '\')" title="查看">查看</a></li>' +
86
+		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_edit_' + row.companyname + '" onclick="btn_warehousing(\'' + row.companyname + '\')" title="入库">入库</a></li>' +
87
+		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_EXwarehouse_' + row.companyname + '" onclick="btn_EXwarehouse(' + row.companyname + ')" title="出库">出库</a></li>' +
88
+		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_Borrowing_' + row.companyname + '" onclick="btn_Borrowing(' + row.companyname + ')" title="借阅">借阅</a></li>' +
89
+		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_giveBack_' + row.companyname + '" onclick="btn_giveBack(' + row.companyname + ')" title="出库">归还</a></li>' +
90
+		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_delete_' + row.companyname + '" onclick="btn_delete(\'' + row.companyname + '\')" title="删除">删除</a></li>' +
91
+	'</ul>';
92
+//	if(row.stateName=='在库'){
93
+//		return '<ul class="tool_downs">' +
94
+//		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_edit_' + row.id + '" onclick="btn_edit(\'' + row.id + '\')" title="修改">修改</a></li>' +
95
+//		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_edit_' + row.id + '" onclick="btn_out( '+ row.id +' )" title="出库">出库</a></li>' +
96
+//		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_delete_' + row.id + '" onclick="btn_delete(' + row.id + ')" title="删除">删除</a></li>' +
97
+//		'</ul>';
98
+//	}else{
99
+//		return '<ul class="tool_downs">' +
100
+//		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_edit_' + row.id + '" onclick="btn_edit(\'' + row.id + '\')" title="修改">修改</a></li>' +
101
+//		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_edit_' + row.id + '" onclick="btn_warehousing(\'' + row.id + '\')" title="入库">入库</a></li>' +
102
+//		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_delete_' + row.id + '" onclick="btn_delete(' + row.id + ')" title="删除">删除</a></li>' +
103
+//		'</ul>';
104
+//	}
98 105
 	
99 106
 }
100 107
 
@@ -120,6 +127,19 @@ function btn_out(id,archivesid) {
120 127
 	});
121 128
 }
122 129
 /**
130
+ * 查看
131
+ */
132
+function btn_watch(companyname){
133
+	console.log(companyname);
134
+	layer.open({
135
+		type: 2,
136
+		title: '查看档案物资信息',
137
+		maxmin: true, //开启最大化最小化按钮
138
+		area: ['50%', '60%'],
139
+		content: '../commonTpl/watchOrEditArchivesList.html?companyname='+companyname
140
+	});
141
+}
142
+/**
123 143
  * 入库
124 144
  */
125 145
 function btn_warehousing(id,archivesid) {
@@ -163,7 +183,7 @@ function btn_edit(editId) {
163 183
 		type: 2,
164 184
 		title: '修改档案物资信息',
165 185
 		maxmin: true, //开启最大化最小化按钮
166
-		area: ['50%', '60%'],
186
+		area: ['70%', '90%'],
167 187
 		content: '../commonTpl/addOrEditArchivesList.html?edit_id=' + editId
168 188
 	});
169 189
 }
@@ -183,6 +203,7 @@ function btn_export() {
183 203
 
184 204
 //删除
185 205
 function btn_delete(cid) {
206
+	console.log(cid);
186 207
 	layer.confirm('确定删除当前记录?', {
187 208
 		icon: 7,
188 209
 		btn: ['是', '否'] //按钮
@@ -190,11 +211,11 @@ function btn_delete(cid) {
190 211
 		/*执行删除*/
191 212
 		$.ajax({
192 213
 			type: "post",
193
-			url: huayi.config.callcenter_url + "archives/DeleteQuestion",
214
+			url: huayi.config.callcenter_url + "archives/delateArchivesByCompanyName",
194 215
 			dataType: 'json',
195 216
 			async: true,
196 217
 			data: {
197
-				id: cid,//客户Id,可多选[1,2,3]
218
+				companyName: cid,//客户Id,可多选[1,2,3]
198 219
 				token: $.cookie("token")
199 220
 			},
200 221
 			success: function(data) {
@@ -205,6 +226,29 @@ function btn_delete(cid) {
205 226
 		});
206 227
 	});
207 228
 }
229
+//function btn_delete(cid) {
230
+//	layer.confirm('确定删除当前记录?', {
231
+//		icon: 7,
232
+//		btn: ['是', '否'] //按钮
233
+//	}, function(index) {
234
+//		/*执行删除*/
235
+//		$.ajax({
236
+//			type: "post",
237
+//			url: huayi.config.callcenter_url + "archives/DeleteQuestion",
238
+//			dataType: 'json',
239
+//			async: true,
240
+//			data: {
241
+//				id: cid,//客户Id,可多选[1,2,3]
242
+//				token: $.cookie("token")
243
+//			},
244
+//			success: function(data) {
245
+//				layer.msg("删除成功!");
246
+//				$('#cusList').bootstrapTable('refresh');
247
+//				layer.close(index);
248
+//			}
249
+//		});
250
+//	});
251
+//}
208 252
 
209 253
 //导出
210 254
 $('.btn_export1').click(function() {

+ 67 - 0
CallCenterWeb.UI/ArchivesManagement/js/wacthOrEditArchivesList.js

@@ -0,0 +1,67 @@
1
+$(document).ready(function() {
2
+	initTable();
3
+});
4
+//表格初始化
5
+function initTable() {
6
+	var companyname = decodeURI(helper.request.queryString("companyname"));
7
+	//先销毁表格
8
+	$('#watchTable').bootstrapTable('destroy');
9
+	//初始化表格,动态从服务器加载数据
10
+	$("#watchTable").bootstrapTable({
11
+		method: "get", //使用get请求到服务器获取数据
12
+		url: huayi.config.callcenter_url + "archives/GetListByCompany", //获取数据的Servlet地址
13
+		contentType: 'application/x-www-form-urlencoded',
14
+		striped: true, //表格显示条纹
15
+		pagination: false, //启动分页
16
+		pageSize: 10, //每页显示的记录数
17
+		pageNumber: 1, //当前第几页
18
+		pageList: [10, 20, 50, 100], //记录数可选列表
19
+		search: false, //是否启用查询
20
+		showColumns: false, //显示下拉框勾选要显示的列
21
+		showRefresh: false, //显示刷新按钮
22
+		sidePagination: "server", //表示服务端请求
23
+		//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
24
+		//设置为limit可以获取limit, offset, search, sort, order
25
+		queryParamsType: "undefined",
26
+		queryParams: function queryParams(params) { //设置查询参数
27
+			var param = {
28
+				F_CompanyName:companyname,
29
+				token: $.cookie("token")
30
+			};
31
+			return param;
32
+		},
33
+		responseHandler:function(res){
34
+		    return {
35
+		        "total": res.data.total,//总页数
36
+		        "rows": res.data.rows   //数据
37
+		    };
38
+		},
39
+		onLoadSuccess: function(res) { //加载成功时执行
40
+			console.log(res);
41
+			$("#totalNum").html(res.total[0].total);
42
+		},
43
+		onLoadError: function() { //加载失败时执行
44
+			//layer.msg("加载数据失败", { time: 1500, icon: 2 });
45
+		}
46
+	});
47
+}
48
+//格式化操作
49
+function formatterOprate(val, row){
50
+	console.log(val, row);
51
+	return '<ul class="tool_downs">' +
52
+		'<li><a href="javascript:;" class="aBtn " authorize="yes" id="HY_edit_' + row.id+ '" onclick="btn_edit(\'' + row.id + '\')" title="修改">修改</a></li>' +		
53
+	'</ul>';
54
+}
55
+/**
56
+ * 修改
57
+ * editId 物资id
58
+ * */
59
+function btn_edit(editId){
60
+	layer.open({
61
+		type: 2,
62
+		title: '修改档案物资信息',
63
+		maxmin: true, //开启最大化最小化按钮
64
+		area: ['70%', '90%'],
65
+		content: '../commonTpl/addOrEditArchivesList.html?edit_id=' + editId
66
+	});
67
+}

+ 2 - 2
CallCenterWeb.UI/Script/Common/huayi.config.js

@@ -3,8 +3,8 @@ if (huayi == undefined) {
3 3
 }
4 4
 huayi.config = {
5 5
     //callcenter_url: "http://localhost:7459/",//生产环境 前端Web站IP和端口
6
-    //、callcenter_url: "http://192.168.4.18:4669/",//生产环境 前端Web站IP和端口
7
-	callcenter_url: "http://192.168.8.9:1031/",//生产环境 前端Web站IP和端口
6
+//  callcenter_url: "http://192.168.4.18:4669/",//生产环境 前端Web站IP和端口
7
+    callcenter_url: "http://192.168.8.9:1031/",//生产环境 前端Web站IP和端口
8 8
     socket_ip: "192.168.5.7",//WebSocket通讯ip
9 9
     socket_port: "8081",    //WebSocket通讯端口
10 10
     menuworktime: 30000,    //菜单工单数量刷新间隔

+ 1 - 1
CallCenterWeb.UI/commonTpl/addOrEditArchivesList.html

@@ -47,7 +47,7 @@
47 47
 					<li class="form-group">
48 48
 						<label for="customer_name" class="col-md-2"><b class="text_require">*</b>物资名称</label>
49 49
 						<div class="col-md-4">
50
-							<input id="customer_name" class="form-control" type="text" autocomplete="off" />
50
+							<input id="customer_name" class="form-control" type="text" autocomplete="off" value="1"/>
51 51
 						</div>
52 52
 					</li>
53 53
 					<li class="form-group">

+ 61 - 0
CallCenterWeb.UI/commonTpl/watchOrEditArchivesList.html

@@ -0,0 +1,61 @@
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
+		<style type="text/css">
13
+			.OA_task_2{
14
+	        	/*width: 124px;*/
15
+	        	position: absolute;
16
+	        	top: 105px;
17
+	        	left: 75px;
18
+	        	z-index: 123;
19
+	        	overflow: auto;
20
+	        	height: 84px !important;
21
+	        }
22
+	        .OA_task_2 li{
23
+	        	text-align: center;
24
+	        	line-height: 27px;
25
+	        	background: #FFFFFF;
26
+	        	border-bottom: 1px #CCCCCC solid;
27
+	        }
28
+		     .OA_task_2 li:hover{
29
+		     	background:#00a1cb;
30
+		     	color: #FFFFFF;
31
+		     	cursor: pointer;
32
+		     }
33
+		</style>
34
+	</head>
35
+
36
+	<body>
37
+		<div class="container">
38
+			<div class="tab_contents" id="tab_user_contents">
39
+				<div style="width: 100%;padding: 10px;">
40
+					<table id="watchTable" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
41
+						<thead>
42
+							<tr>
43
+								<th data-field="A_CompanyName" data-align="center">公司名称</th>
44
+								<th data-field="A_archiveName" data-align="center">物资名称</th>
45
+								<th data-field="statename" data-align="center">物资状态</th>
46
+								<th data-formatter="formatterOprate" data-align="center">操作</th>
47
+							</tr>
48
+						</thead>
49
+					</table>
50
+					总共:<span id="totalNum" style="display: inline-block;margin-top: 10px;"></span> 条
51
+				</div>
52
+			</div>
53
+		</div>
54
+		<script src="../js/laydate/laydate.js"></script>
55
+		<script src="../js/bootstrap-select/js/bootstrap-select.js"></script>
56
+		<script src="../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>
57
+		<script src="../Script/Common/regexs.js"></script>
58
+		<script src="../ArchivesManagement/js/wacthOrEditArchivesList.js"></script>
59
+	</body>
60
+
61
+</html>