修改单据insert和update的代码,解决大数据量无法写入的bug,另外增加消息提醒的定时刷新
This commit is contained in:
@@ -438,4 +438,25 @@ $(function () {
|
||||
}, 10 * 1000);
|
||||
}
|
||||
|
||||
//更新消息条数
|
||||
function getMsgCountByStatus() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/msg/getMsgCountByStatus?status=1",
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res && res.code === 200) {
|
||||
if(res.data) {
|
||||
var count = res.data.count;
|
||||
$("#msgNum, #msgNum2").text(count);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
getMsgCountByStatus();
|
||||
setInterval(function() {
|
||||
getMsgCountByStatus()
|
||||
}, 1000*60);
|
||||
|
||||
});
|
||||
@@ -2513,9 +2513,10 @@
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: url,
|
||||
contentType:"application/json",
|
||||
dataType: "json",
|
||||
async : false,
|
||||
data: ({
|
||||
data: JSON.stringify({
|
||||
info:infoStr,
|
||||
inserted: JSON.stringify(inserted),
|
||||
deleted: JSON.stringify(deleted),
|
||||
@@ -2553,9 +2554,10 @@
|
||||
$.ajax({
|
||||
type:"post",
|
||||
url: url,
|
||||
contentType:"application/json",
|
||||
dataType: "json",
|
||||
async : false,
|
||||
data: ({
|
||||
data: JSON.stringify({
|
||||
id:url.substring(url.lastIndexOf("?id=")+4,url.length),
|
||||
info:infoStr,
|
||||
inserted: JSON.stringify(inserted),
|
||||
|
||||
Reference in New Issue
Block a user