|
|
@@ -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);
|