|
@@ -163,12 +163,31 @@
|
|
|
$.messager.alert("提示", "意见请小于200字。");
|
|
|
return false;
|
|
|
}else{
|
|
|
- if (config.callback && typeof config.callback == 'function') {
|
|
|
- config.callback(true);
|
|
|
- }
|
|
|
- Xt.gryjDialog.dialog('close');
|
|
|
+ $.messager.confirm("确认", "是否加入常用意见", function(msg) {
|
|
|
+ if (msg) {
|
|
|
+ $.post($.ctx + "/gryj/saveYj", {
|
|
|
+ opinion : $('#opinion1').val()
|
|
|
+ }, function(data, status) {
|
|
|
+ if (data.success) {
|
|
|
+ if (config.callback && typeof config.callback == 'function') {
|
|
|
+ config.callback(true);
|
|
|
+ }
|
|
|
+ Xt.gryjDialog.dialog('close');
|
|
|
+ } else {
|
|
|
+ if (config.callback && typeof config.callback == 'function') {
|
|
|
+ config.callback(true);
|
|
|
+ }
|
|
|
+ Xt.gryjDialog.dialog('close');
|
|
|
+ }
|
|
|
+ }, "json");
|
|
|
+ }else{
|
|
|
+ if (config.callback && typeof config.callback == 'function') {
|
|
|
+ config.callback(true);
|
|
|
+ }
|
|
|
+ Xt.gryjDialog.dialog('close');
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}, {
|
|
|
text : '取消',
|