|
@@ -61,15 +61,7 @@
|
|
|
<div class="layui-inline" id="monthSelect" style="width: 100%">
|
|
|
<div class="layui-input-inline">
|
|
|
<form>
|
|
|
- <label>控制权限</label>
|
|
|
- <select name="city" id="editStatus" style="width: 70px">
|
|
|
- <option value="0">开启</option>
|
|
|
- <option value="1">关闭</option>
|
|
|
- </select>
|
|
|
- <label> 可编辑列:从 </label><input type="text" id="editFrom" style="width: 50px"
|
|
|
- onkeyup="this.value=this.value.replace('-','')"></input> 到 <input
|
|
|
- type="text" id="editTo" style="width: 50px"
|
|
|
- onkeyup="this.value=this.value.replace('-','')"></input>
|
|
|
+
|
|
|
</form>
|
|
|
</div>
|
|
|
<div style="float: right;padding-right: 10px" id="shareBtn">
|
|
@@ -125,13 +117,16 @@
|
|
|
window.luckysheet.destroy();
|
|
|
}
|
|
|
//拿参数的
|
|
|
- var excelId = $(window.parent.document).find("#excelId").attr("value");
|
|
|
- console.log(excelId);
|
|
|
- type = '2';
|
|
|
+ var r = window.top.location.href.split('?')[1];
|
|
|
+ var excelId = r.split('&')[1].split('=')[1];
|
|
|
+ type = r.split('&')[0].split('=')[1];
|
|
|
+ console.log("id:" + excelId);
|
|
|
+ console.log("type:" + type);
|
|
|
toolBar = '';
|
|
|
- var url = '/market/cOnlineExcel/getExcelInfo';
|
|
|
- util.ajaxJson("数据加载中", ctx + url, {
|
|
|
- "id": excelId ? excelId : '',
|
|
|
+ var url = '/market/cIncomeExcelTemplate/getExcelInfo';
|
|
|
+ util.ajaxJson("数据加载中", ctx + url,
|
|
|
+ {
|
|
|
+ "id": excelId ? excelId : '', "type": type
|
|
|
}, function (res) {
|
|
|
if (res.result == 0) {
|
|
|
// 查看和修改时 下拉框赋值
|
|
@@ -139,9 +134,6 @@
|
|
|
excelLevel = res.body.excelLevel;
|
|
|
isAdmin = res.body.isExcelAdmin;
|
|
|
emptyExcel = res.body.emptyExcel;
|
|
|
- $("#editFrom").val(excelInfo.editConStart);
|
|
|
- $("#editTo").val(excelInfo.editConEnd);
|
|
|
- $("#editStatus").val(excelInfo.editStatus);
|
|
|
console.log(type);
|
|
|
if (type == '2') {
|
|
|
if (isAdmin) {
|
|
@@ -167,14 +159,14 @@
|
|
|
// 表格初始化
|
|
|
function initExcel(data,name) {
|
|
|
if (type == '1') {
|
|
|
- flag = false
|
|
|
+ flag = true
|
|
|
} else {
|
|
|
flag = true
|
|
|
}
|
|
|
if (isAdmin) {
|
|
|
adminFlag = true;
|
|
|
}
|
|
|
- var fileName = excelInfo.fileName;
|
|
|
+ var fileName = excelInfo.name;
|
|
|
if ($.trim(name)!=''){
|
|
|
fileName = name;
|
|
|
}
|
|
@@ -288,29 +280,19 @@
|
|
|
console.log(err)
|
|
|
}
|
|
|
if (isAdmin == false) {
|
|
|
- $("#editStatus").attr('disabled', true);
|
|
|
- $("#editFrom").attr('disabled', true);
|
|
|
- $("#editTo").attr('disabled', true);
|
|
|
- $("#shareBtn").hide();
|
|
|
+
|
|
|
} else {
|
|
|
- $("#editStatus").attr('disabled', false);
|
|
|
- $("#editFrom").attr('disabled', false);
|
|
|
- $("#editTo").attr('disabled', false);
|
|
|
- $("#shareBtn").show();
|
|
|
+
|
|
|
}
|
|
|
if (emptyExcel == true) {
|
|
|
- $("#shareBtn").show();
|
|
|
- $("#saves").hide();
|
|
|
+
|
|
|
} else {
|
|
|
- $("#shareBtn").hide();
|
|
|
- $("#saves").show();
|
|
|
+
|
|
|
}
|
|
|
if (excelInfo.shareStatus == '1') {
|
|
|
- $("#editTo").attr('disabled', true);
|
|
|
- $("#editFrom").attr('disabled', true);
|
|
|
+
|
|
|
} else {
|
|
|
- $("#editTo").attr('disabled', false);
|
|
|
- $("#editFrom").attr('disabled', false);
|
|
|
+
|
|
|
}
|
|
|
initHandel();
|
|
|
}
|