|
@@ -169,6 +169,11 @@
|
|
|
'<button id="exitFullScreen" class="btn btn-primary" style="padding:3px 6px;font-size: 16px;margin-right: 10px;display:none">退出全屏</button>';
|
|
|
showToolBar = false;
|
|
|
}
|
|
|
+ if (type == '5') {
|
|
|
+ toolBar = '<button id="fullScreen" class="btn btn-primary" style="padding:3px 6px;font-size: 16px;margin-right: 10px;">全屏显示</button>' +
|
|
|
+ '<button id="exitFullScreen" class="btn btn-primary" style="padding:3px 6px;font-size: 16px;margin-right: 10px;display:none">退出全屏</button>';
|
|
|
+ toolBar += '<button id="toAudit" class="btn btn-primary btn-primary" style="padding:3px 6px;font-size: 16px;margin-right: 10px;">提交</button>';
|
|
|
+ }
|
|
|
//toolBar += '<button id="saves" class="btn btn-primary btn-danger" style=" padding:3px 6px; font-size: 12px; margin-right: 10px;">保存</button>';
|
|
|
var eJson = res.body.excelJson;
|
|
|
var cellData = luckysheet.transToCellData(eJson[0].data);
|
|
@@ -223,7 +228,6 @@
|
|
|
underline: showToolBar, // '下划线 (Alt+Shift+6)'
|
|
|
textColor: showToolBar, // '文本颜色'
|
|
|
fillColor: showToolBar, // '单元格颜色'
|
|
|
- border: showToolBar, // '边框'
|
|
|
mergeCell: showToolBar, // '合并单元格'
|
|
|
horizontalAlignMode: showToolBar, // '水平对齐方式'
|
|
|
verticalAlignMode: showToolBar, // '垂直对齐方式'
|
|
@@ -234,7 +238,6 @@
|
|
|
chart: showToolBar, // '图表'(图标隐藏,但是如果配置了chart插件,右击仍然可以新建图表)
|
|
|
postil: showToolBar, //'批注'
|
|
|
pivotTable: showToolBar, //'数据透视表'
|
|
|
- function: showToolBar, // '公式'
|
|
|
frozenMode: showToolBar, // '冻结方式'
|
|
|
sortAndFilter: showToolBar, // '排序和筛选'
|
|
|
conditionalFormat: showToolBar, // '条件格式'
|
|
@@ -295,8 +298,7 @@
|
|
|
|
|
|
},
|
|
|
rangePasteBefore: function (range, data) {
|
|
|
- //禁止选区粘贴
|
|
|
- return false;
|
|
|
+
|
|
|
},
|
|
|
},
|
|
|
})
|
|
@@ -363,77 +365,14 @@
|
|
|
//调用vue页面方法执行新增/修改
|
|
|
window.parent['addNewTemplate'](excelName, excelData, templateType);
|
|
|
});
|
|
|
- // 保存
|
|
|
- $('#saves').off("click").click(function () {
|
|
|
- // 当前工作表名
|
|
|
+ $('#toAudit').off("click").click(function () {
|
|
|
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("正在加载中", ctx + '/market/cOnlineExcel/checkExcelEmpty', {
|
|
|
- data: excelData,
|
|
|
- }, function (data) {
|
|
|
- if (data.result == 1) {
|
|
|
- window.top.$vm.$message({
|
|
|
- message: data.desc,
|
|
|
- type: 'error'
|
|
|
- });
|
|
|
- } else {
|
|
|
- util.ajaxJson("正在加载中", 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()
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
- })
|
|
|
+ //调用vue页面方法执行提审
|
|
|
+ window.parent['openAuditWindow'](excelName, excelData);
|
|
|
+ });
|
|
|
// 导出
|
|
|
$('#exports').click(function () {
|
|
|
var excelName = luckysheet.toJson().title;
|