|
@@ -324,77 +324,77 @@
|
|
if (isAdmin) {
|
|
if (isAdmin) {
|
|
$("#newShareBtn").show();
|
|
$("#newShareBtn").show();
|
|
}
|
|
}
|
|
- console.log("执行自动保存定时器")
|
|
|
|
- var t1 = window.setInterval(function autoSave() {
|
|
|
|
- console.log("执行自动保存")
|
|
|
|
- var excelId = $(window.parent.document).find("#excelId").attr("value");
|
|
|
|
- var sheetName = luckysheet.getSheet().name;
|
|
|
|
- var excelData = luckysheet.getSheet(sheetName);
|
|
|
|
- var urlsave = '/market/cOnlineExcel/saveExcel';
|
|
|
|
- var editFrom = $("#editFrom").val();
|
|
|
|
- var editTo = $("#editTo").val();
|
|
|
|
- var editStatus = $("#editStatus").val();
|
|
|
|
- var excelName = luckysheet.toJson().title;
|
|
|
|
- if ($.trim(editFrom) == '' && $.trim(editTo) == '') {
|
|
|
|
-
|
|
|
|
- } else if (/^\d*$/.test(editFrom) && /^\d*$/.test(editTo)) {
|
|
|
|
- if (editFrom == 0) {
|
|
|
|
- window.top.$vm.$message({
|
|
|
|
- message: '自动保存出错:可编辑列开始不能为0',
|
|
|
|
- type: 'info'
|
|
|
|
- })
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if (editFrom > editTo) {
|
|
|
|
- window.top.$vm.$message({
|
|
|
|
- message: '自动保存出错:可编辑列的起始列不能大于结束列',
|
|
|
|
- type: 'info'
|
|
|
|
- })
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- } else if (/^[a-zA-Z]+$/.test(editFrom) && /^[a-zA-Z]+$/.test(editTo)) {
|
|
|
|
-
|
|
|
|
- } else {
|
|
|
|
- window.top.$vm.$message({
|
|
|
|
- message: '自动保存出错:可编辑列必须全部为字母或数字',
|
|
|
|
- type: 'info'
|
|
|
|
- });
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- util.ajaxJson(null, ctx + '/market/cOnlineExcel/checkExcelEmpty', {
|
|
|
|
- data: excelData,
|
|
|
|
- }, function (data) {
|
|
|
|
- if (data.result == 1) {
|
|
|
|
- window.top.$vm.$message({
|
|
|
|
- message: data.desc,
|
|
|
|
- type: 'error'
|
|
|
|
- });
|
|
|
|
- } else {
|
|
|
|
- util.ajaxJson(null, ctx + urlsave, {
|
|
|
|
- data: excelData,
|
|
|
|
- id: excelId,
|
|
|
|
- editConStart: editFrom,
|
|
|
|
- editConEnd: editTo,
|
|
|
|
- excelName: excelName,
|
|
|
|
- editStatus: editStatus
|
|
|
|
- }, function (data) {
|
|
|
|
- if (data.result == 1) {
|
|
|
|
- window.top.$vm.$message({
|
|
|
|
- message: data.desc,
|
|
|
|
- type: 'error'
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- // window.top.$vm.$message({
|
|
|
|
- // message: '自动保存成功',
|
|
|
|
- // type: 'info'
|
|
|
|
- // });
|
|
|
|
- //console.log(data);
|
|
|
|
- //getData()
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
- }, 15000)
|
|
|
|
|
|
+ //console.log("执行自动保存定时器")
|
|
|
|
+ // var t1 = window.setInterval(function autoSave() {
|
|
|
|
+ // console.log("执行自动保存")
|
|
|
|
+ // var excelId = $(window.parent.document).find("#excelId").attr("value");
|
|
|
|
+ // var sheetName = luckysheet.getSheet().name;
|
|
|
|
+ // var excelData = luckysheet.getSheet(sheetName);
|
|
|
|
+ // var urlsave = '/market/cOnlineExcel/saveExcel';
|
|
|
|
+ // var editFrom = $("#editFrom").val();
|
|
|
|
+ // var editTo = $("#editTo").val();
|
|
|
|
+ // var editStatus = $("#editStatus").val();
|
|
|
|
+ // var excelName = luckysheet.toJson().title;
|
|
|
|
+ // if ($.trim(editFrom) == '' && $.trim(editTo) == '') {
|
|
|
|
+ //
|
|
|
|
+ // } else if (/^\d*$/.test(editFrom) && /^\d*$/.test(editTo)) {
|
|
|
|
+ // if (editFrom == 0) {
|
|
|
|
+ // window.top.$vm.$message({
|
|
|
|
+ // message: '自动保存出错:可编辑列开始不能为0',
|
|
|
|
+ // type: 'info'
|
|
|
|
+ // })
|
|
|
|
+ // return;
|
|
|
|
+ // }
|
|
|
|
+ // if (editFrom > editTo) {
|
|
|
|
+ // window.top.$vm.$message({
|
|
|
|
+ // message: '自动保存出错:可编辑列的起始列不能大于结束列',
|
|
|
|
+ // type: 'info'
|
|
|
|
+ // })
|
|
|
|
+ // return;
|
|
|
|
+ // }
|
|
|
|
+ // } else if (/^[a-zA-Z]+$/.test(editFrom) && /^[a-zA-Z]+$/.test(editTo)) {
|
|
|
|
+ //
|
|
|
|
+ // } else {
|
|
|
|
+ // window.top.$vm.$message({
|
|
|
|
+ // message: '自动保存出错:可编辑列必须全部为字母或数字',
|
|
|
|
+ // type: 'info'
|
|
|
|
+ // });
|
|
|
|
+ // return;
|
|
|
|
+ // }
|
|
|
|
+ // util.ajaxJson(null, ctx + '/market/cOnlineExcel/checkExcelEmpty', {
|
|
|
|
+ // data: excelData,
|
|
|
|
+ // }, function (data) {
|
|
|
|
+ // if (data.result == 1) {
|
|
|
|
+ // window.top.$vm.$message({
|
|
|
|
+ // message: data.desc,
|
|
|
|
+ // type: 'error'
|
|
|
|
+ // });
|
|
|
|
+ // } else {
|
|
|
|
+ // util.ajaxJson(null, ctx + urlsave, {
|
|
|
|
+ // data: excelData,
|
|
|
|
+ // id: excelId,
|
|
|
|
+ // editConStart: editFrom,
|
|
|
|
+ // editConEnd: editTo,
|
|
|
|
+ // excelName: excelName,
|
|
|
|
+ // editStatus: editStatus
|
|
|
|
+ // }, function (data) {
|
|
|
|
+ // if (data.result == 1) {
|
|
|
|
+ // window.top.$vm.$message({
|
|
|
|
+ // message: data.desc,
|
|
|
|
+ // type: 'error'
|
|
|
|
+ // })
|
|
|
|
+ // } else {
|
|
|
|
+ // // window.top.$vm.$message({
|
|
|
|
+ // // message: '自动保存成功',
|
|
|
|
+ // // type: 'info'
|
|
|
|
+ // // });
|
|
|
|
+ // //console.log(data);
|
|
|
|
+ // //getData()
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+ // }
|
|
|
|
+ // });
|
|
|
|
+ // }, 15000)
|
|
}
|
|
}
|
|
if (excelInfo.shareStatus == '1') {
|
|
if (excelInfo.shareStatus == '1') {
|
|
$("#editTo").attr('disabled', true);
|
|
$("#editTo").attr('disabled', true);
|