Sfoglia il codice sorgente

修改 业务信息内容,增加详情

fanlongfei 7 anni fa
parent
commit
1ebaa0a9ae

+ 3 - 4
CallCenterWeb.UI/Script/Common/huayi.config.js

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

+ 4 - 0
CallCenterWeb.UI/Script/Common/regexs.js

@@ -142,6 +142,10 @@ var regexs = {
142 142
 	 * */
143 143
 	address: /^([\u2E80-\u9FFF]|\w|[,,\.。])*$/,
144 144
 	/**
145
+	 * 匹配中文、英文、数字、括号和顿号  。
146
+	 * */
147
+	businessname: /^[A-Za-z0-9\u4e00-\u9fa5()、]+$/,
148
+	/**
145 149
 	 * 匹配中文、英文、数字、下划线 和 \ - —— #
146 150
 	 * */
147 151
 	roomNum: /^([\u2E80-\u9FFF]|\w|[\-_——#])*$/,

+ 5 - 6
CallCenterWeb.UI/WorkOrder/business.html

@@ -47,12 +47,11 @@
47 47
 				<table id="workorderlist" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
48 48
 					<thead>
49 49
 						<tr>
50
-							<th data-field="F_BusName" data-align="center">业务名称	</th>
51
-							<th data-field="F_BusContent" data-align="center">业务内容</th>
52
-							<!-- <th data-field="F_Remark" data-align="center" data-formatter="formatterDetail">备注</th> -->
53
-							<th data-field="F_Remark" data-align="center">备注</th>
54
-							<!-- <th data-field="F_CusCode" data-align="center">登录的公司code</th> -->
55
-							<th data-field="F_Id" data-formatter="formatterOprate" data-width="100" data-align="center">操作</th>
50
+							<th data-field="F_BusName" data-align="center">业务名称</th>
51
+							<th data-field="F_BusLabel" data-align="center">业务标签</th>
52
+							<th data-field="F_BusContent" data-formatter="formatterContent" data-align="center">业务内容</th>
53
+							<th data-field="F_Remark" data-align="center" data-formatter="formatterDetail">备注</th>
54
+							<th data-field="F_Id" data-formatter="formatterOprate" data-width="150" data-align="center">操作</th>
56 55
 						</tr>
57 56
 					</thead>
58 57
 				</table>

+ 30 - 3
CallCenterWeb.UI/WorkOrder/js/addOrEditBusiness.js

@@ -1,6 +1,31 @@
1 1
 /**
2 2
  * 修改增加业务信息
3 3
  * */
4
+
5
+//编辑器配置
6
+KindEditor.ready(function(K) {
7
+	window.editor = K.create('#F_BusContent', {
8
+		imgMaxSize: 10 * 1024 * 1024,
9
+		minHeight: '300px',
10
+		uploadJson: '../../js/kindeditor/asp.net/upload_json.ashx',
11
+		fileManagerJson: '../../js/kindeditor/asp.net/file_manager_json.ashx',
12
+		allowFileManager: true,
13
+		afterCreate: function() {
14
+			this.loadPlugin('autoheight');
15
+		},
16
+		items: [
17
+			'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
18
+			'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
19
+			'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
20
+			'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
21
+			'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
22
+			'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image',
23
+			'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
24
+			'anchor', 'link', 'unlink', '|', 'about'
25
+		]
26
+	});
27
+}); 
28
+ 
4 29
 $(function() {
5 30
 	autosize($('textarea'));
6 31
 // 	//获取所属行业//获取税务类别//获取客户信誉等级
@@ -28,7 +53,8 @@ function getCustomer(ids) {
28 53
 			data = data.data;
29 54
 			if (data) {
30 55
 				$('#F_BusName').val(data.F_BusName);//	string 业务名称	
31
-				$('#F_BusContent').val(data.F_BusContent);//	string 业务内容	
56
+				editor.html(decodeURIComponent(data.F_BusContent));//	string 业务内容	
57
+				// $('#F_BusContent').val(data.F_BusContent);//	string 业务内容	
32 58
 				$('#F_BusLabel').val(data.F_BusLabel);//	string 业务标签
33 59
 				$('#F_Remark').val(data.F_Remark);//	string 备注
34 60
 				$('#F_BusName').trigger('blur');
@@ -65,7 +91,8 @@ function saveCustomer() {
65 91
 			F_Id: edit_id,//主ID
66 92
 			F_BusName: $('#F_BusName').val(),//	string 业务名称	
67 93
 			F_BusLabel: $('#F_BusLabel').val(),//	string 业务标签
68
-			F_BusContent: helper.filter.delHtmlTag($('#F_BusContent').val()),//	string 业务内容	
94
+			// F_BusContent: helper.filter.delHtmlTag($('#F_BusContent').val()),//	string 业务内容	
95
+			F_BusContent: encodeURIComponent(editor.html()),//	string 业务内容	
69 96
 			F_Remark: helper.filter.delHtmlTag($('#F_Remark').val()),//	string 备注
70 97
 			token: $.cookie("token")
71 98
 		},
@@ -115,7 +142,7 @@ function valideInput() {
115 142
 	//console.log($(this).attr('id'));
116 143
 	switch ($(this).attr('id')) {
117 144
 		case 'F_BusName': //业务名称
118
-			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);
145
+			valideMethods(_that, regexs.businessname, '格式不正确(只能输入中文、英文、数字、括号和顿号 )!', true);
119 146
 			break;
120 147
 		case 'F_BusLabel': //业务标签
121 148
 			valideMethods(_that, regexs.chOrenOrnum, '格式不正确(只能输入中文、英文、数字)!', true);

+ 27 - 0
CallCenterWeb.UI/WorkOrder/js/business.js

@@ -58,6 +58,20 @@ function initTable() {
58 58
 	});
59 59
 }
60 60
 
61
+//格式化内容
62
+function formatterContent(val){
63
+	var content = '-';
64
+	if(val){
65
+		content = decodeURIComponent(val);
66
+		content = helper.filter.filterHTMLTag(content);
67
+		if(content.length > 60) {
68
+			content = content.substring(0, 60) + '...';
69
+		}
70
+	}
71
+	return content;
72
+}
73
+
74
+
61 75
 //格式化 备注
62 76
 function formatterDetail(val) {
63 77
 	if(val) {
@@ -74,6 +88,7 @@ function formatterDetail(val) {
74 88
 //格式化操作
75 89
 function formatterOprate(val) {
76 90
 	return '<ul class="tool_downs">' +
91
+						'<li><a href="javascript:;" class="aBtn" authorize="yes" id="HY_detail_' + val + '" onclick="btn_detail(' + val + ')" title="详情">详情</a></li>' +
77 92
 						'<li><a href="javascript:;" class="aBtn" authorize="yes" id="HY_edit_' + val + '" onclick="btn_edit(' + val + ')" title="编辑">编辑</a></li>' +
78 93
 						'<li><a href="javascript:;" class="aBtn" authorize="yes" id="HY_delete_' + val + '" onclick="btn_delete(' + val + ')" title="删除">删除</a></li>' +
79 94
 					'</ul>';
@@ -91,6 +106,18 @@ function btn_add(){
91 106
 	});
92 107
 }
93 108
 
109
+//详情
110
+function btn_detail(editId){
111
+	layer.open({
112
+		type: 2,
113
+		title: '业务信息详情',
114
+		maxmin: true, //开启最大化最小化按钮
115
+		shade: 0,
116
+		area: ['80%', '90%'],
117
+		content: 'template/seeBusiness.html?edit_id=' + editId
118
+	});
119
+}
120
+
94 121
 //编辑
95 122
 function btn_edit(editId){
96 123
 	layer.open({

+ 40 - 0
CallCenterWeb.UI/WorkOrder/js/seeBusiness.js

@@ -0,0 +1,40 @@
1
+/**
2
+ * 业务信息详情
3
+ * */
4
+$(function() {
5
+// 	//获取所属行业//获取税务类别//获取客户信誉等级
6
+// 	$.when(helper.getDropList.getlistDropByDic($('#customer_subtrade'), 'KHSSHY'),
7
+// 			helper.getDropList.getlistDropByDic($('#customer_taxCategory'), 'SWLB'),
8
+// 			helper.getDropList.getlistDropByDic($('#customer_layer'), 'KHLayer'))
9
+// 		.done(function() {
10
+			var edit_id = helper.request.queryString("edit_id");
11
+			if (edit_id) {
12
+				getCustomer(edit_id);
13
+			}
14
+		// });
15
+
16
+});
17
+
18
+//获取详情
19
+function getCustomer(ids) {
20
+	$.getJSON(huayi.config.callcenter_url + "WoBill/GetBus", {
21
+		id: ids, //id
22
+		token: $.cookie("token")
23
+	}, function(data) {
24
+		if (data.state.toLowerCase() == "success") {
25
+			data = data.data;
26
+			if (data) {
27
+				$('#bus_title').text(data.F_BusName);//	string 业务名称	
28
+				$('#bus_label').text(data.F_BusLabel);//	string 业务标签
29
+				$('#bus_createuser').text(data.F_CreateBy);	
30
+				$('#bus_createtime').text(data.F_CreateOn);	
31
+				if(data.F_BusContent){
32
+					$('#bus_content').html(decodeURIComponent(data.F_BusContent));//	string 业务内容	
33
+				}else{
34
+					$('#bus_content').text('暂无内容。。。');
35
+				}
36
+				$('#bus_remark').html(helper.filter.content(data.F_Remark));//	string 备注
37
+			}
38
+		}
39
+	});
40
+}

+ 2 - 0
CallCenterWeb.UI/WorkOrder/template/addOrEditBusiness.html

@@ -54,6 +54,8 @@
54 54
 			</div>
55 55
 		</div>
56 56
 		<script src="../../js/autosize/autosize.min.js"></script>
57
+		<script src="../../js/kindeditor/kindeditor-all-min.js"></script>
58
+		<script src="../../js/kindeditor/lang/zh-CN.js"></script>
57 59
 		<script src="../../Script/Common/regexs.js"></script>
58 60
 		<script src="../js/addOrEditBusiness.js"></script>
59 61
 	</body>

+ 48 - 0
CallCenterWeb.UI/WorkOrder/template/seeBusiness.html

@@ -0,0 +1,48 @@
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
+		<style>
11
+			.bus_content{
12
+				margin: 20px auto;
13
+			}
14
+			.bus_label{
15
+				margin: 20px 0 40px 0; 
16
+			}
17
+			.bus_subtitle{
18
+				font-size: 16px;
19
+				font-weight: normal;
20
+				padding: 5px;
21
+				border-bottom: 1px dashed #1ab394;
22
+			}
23
+		</style>
24
+	</head>
25
+
26
+	<body>
27
+		<div class="container">
28
+			<h1 id="bus_title" class="text-center"></h1>
29
+			<div class="row clearfix bus_label">
30
+				<div class="col-md-4 text-center">
31
+					业务标签:<span id="bus_label"></span>
32
+				</div>
33
+				<div class="col-md-4 text-center">
34
+					创建人:<span id="bus_createuser"></span>
35
+				</div>
36
+				<div class="col-md-4 text-center">
37
+					创建时间:<span id="bus_createtime"></span>
38
+				</div>
39
+			</div>
40
+			<h5 class="bus_subtitle">业务内容:</h4>
41
+			<div id="bus_content" class="bus_content"></div>
42
+			<h5 class="bus_subtitle">业务备注:</h4>
43
+			<div id="bus_remark" class="bus_content"></div>
44
+		</div>
45
+		<script src="../js/seeBusiness.js"></script>
46
+	</body>
47
+
48
+</html>