|
@@ -155,7 +155,7 @@ $(document).ready(() => {
|
|
{title: '|调差金额(材料税)', colSpan: '|1', rowSpan: '|1', field: 'm_tax_tp', hAlign: 2, width: 100, type: 'Number', readOnly: true, getValue: 'getValue.m_tax_tp'},
|
|
{title: '|调差金额(材料税)', colSpan: '|1', rowSpan: '|1', field: 'm_tax_tp', hAlign: 2, width: 100, type: 'Number', readOnly: true, getValue: 'getValue.m_tax_tp'},
|
|
{title: '截止上期|调差金额', colSpan: '2|1', rowSpan: '1|1', field: 'pre_tp', hAlign: 2, width: 100, type: 'Number', readOnly: true},
|
|
{title: '截止上期|调差金额', colSpan: '2|1', rowSpan: '1|1', field: 'pre_tp', hAlign: 2, width: 100, type: 'Number', readOnly: true},
|
|
{title: '|调差金额(材料税)', colSpan: '|1', rowSpan: '|1', field: 'tax_pre_tp', hAlign: 2, width: 100, type: 'Number', readOnly: true},
|
|
{title: '|调差金额(材料税)', colSpan: '|1', rowSpan: '|1', field: 'tax_pre_tp', hAlign: 2, width: 100, type: 'Number', readOnly: true},
|
|
- {title: '备注', colSpan: '1', rowSpan: '2', field: 'remark', hAlign: 0, width: 50, formatter: '@', readOnly: 'readOnly.remark'},
|
|
|
|
|
|
+ {title: '备注', colSpan: '1', rowSpan: '2', field: 'remark', hAlign: 0, width: 50, formatter: '@', cellType: 'ellipsisAutoTip', readOnly: 'readOnly.remark'},
|
|
{title: '是否汇总', colSpan: '1', rowSpan: '2', field: 'is_summary', hAlign: 1, width: 60, cellType: 'checkbox', readOnly: 'readOnly.isEdit'}
|
|
{title: '是否汇总', colSpan: '1', rowSpan: '2', field: 'is_summary', hAlign: 1, width: 60, cellType: 'checkbox', readOnly: 'readOnly.isEdit'}
|
|
])
|
|
])
|
|
} else {
|
|
} else {
|
|
@@ -164,7 +164,7 @@ $(document).ready(() => {
|
|
{title: '|本期应耗数量', colSpan: '|1', rowSpan: '|1', field: 'quantity', hAlign: 2, width: 90, type: 'Number', readOnly: true},
|
|
{title: '|本期应耗数量', colSpan: '|1', rowSpan: '|1', field: 'quantity', hAlign: 2, width: 90, type: 'Number', readOnly: true},
|
|
{title: '|调差金额', colSpan: '|1', rowSpan: '|1', field: 'm_tp', hAlign: 2, width: 100, type: 'Number', readOnly: true, getValue: 'getValue.m_tp'},
|
|
{title: '|调差金额', colSpan: '|1', rowSpan: '|1', field: 'm_tp', hAlign: 2, width: 100, type: 'Number', readOnly: true, getValue: 'getValue.m_tp'},
|
|
{title: '截止上期|调差金额', colSpan: '1|1', rowSpan: '1|1', field: 'pre_tp', hAlign: 2, width: 100, type: 'Number', readOnly: true},
|
|
{title: '截止上期|调差金额', colSpan: '1|1', rowSpan: '1|1', field: 'pre_tp', hAlign: 2, width: 100, type: 'Number', readOnly: true},
|
|
- {title: '备注', colSpan: '1', rowSpan: '2', field: 'remark', hAlign: 0, width: 50, formatter: '@', readOnly: 'readOnly.remark'},
|
|
|
|
|
|
+ {title: '备注', colSpan: '1', rowSpan: '2', field: 'remark', hAlign: 0, width: 50, formatter: '@', cellType: 'ellipsisAutoTip', readOnly: 'readOnly.remark'},
|
|
{title: '是否汇总', colSpan: '1', rowSpan: '2', field: 'is_summary', hAlign: 1, width: 60, cellType: 'checkbox', readOnly: 'readOnly.isEdit'}
|
|
{title: '是否汇总', colSpan: '1', rowSpan: '2', field: 'is_summary', hAlign: 1, width: 60, cellType: 'checkbox', readOnly: 'readOnly.isEdit'}
|
|
])
|
|
])
|
|
}
|
|
}
|
|
@@ -362,7 +362,7 @@ $(document).ready(() => {
|
|
materialSpreadObj.refreshActn();
|
|
materialSpreadObj.refreshActn();
|
|
// 月信息价需要同时添加空白的list
|
|
// 月信息价需要同时添加空白的list
|
|
if (months.length > 0) {
|
|
if (months.length > 0) {
|
|
- const one_month ={ mb_id: result.id, code: '', name: null, origin: null, unit: null, order: result.order };
|
|
|
|
|
|
+ const one_month ={ mb_id: result.info.id, code: '', name: null, origin: null, unit: null, order: result.info.order };
|
|
for (const m of months) {
|
|
for (const m of months) {
|
|
one_month[m] = null;
|
|
one_month[m] = null;
|
|
}
|
|
}
|
|
@@ -419,73 +419,112 @@ $(document).ready(() => {
|
|
if($('#bills0_list').is(':checked')) {
|
|
if($('#bills0_list').is(':checked')) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ const data = {
|
|
|
|
+ type: 'changeOrder',
|
|
|
|
+ postData: [],
|
|
|
|
+ };
|
|
const sheet = materialSpread.getActiveSheet();
|
|
const sheet = materialSpread.getActiveSheet();
|
|
- const cur = SpreadJsObj.getSelectObject(sheet);
|
|
|
|
- const up = materialBillsData[materialBillsData.indexOf(cur) - 1];
|
|
|
|
- const mbIndex = materialBillsData.indexOf(cur);
|
|
|
|
- postData(window.location.pathname + '/save', {type: 'changeOrder', id1: cur.id, id2: up.id}, function () {
|
|
|
|
- const order = cur.order;
|
|
|
|
- cur.order = up.order;
|
|
|
|
- up.order = order;
|
|
|
|
- materialBillsData.sort(function (a, b) {
|
|
|
|
- return a.order - b.order
|
|
|
|
- });
|
|
|
|
- SpreadJsObj.reLoadSheetData(sheet);
|
|
|
|
- const sel = sheet.getSelections();
|
|
|
|
- const index = materialBillsData.indexOf(cur);
|
|
|
|
- sheet.setSelection(index, sel.length > 0 ? sel[0].col : 0, 1, 1);
|
|
|
|
|
|
+ const selection = sheet.getSelections();
|
|
|
|
+ const row = selection[0].row, count = selection[0].rowCount;
|
|
|
|
+ const first = sheet.zh_data[row];
|
|
|
|
+ if (!first) {
|
|
materialSpreadObj.refreshActn();
|
|
materialSpreadObj.refreshActn();
|
|
- if (months.length > 0) {
|
|
|
|
- const monthCur = monthsList[mbIndex];
|
|
|
|
- const monthUp = monthsList[mbIndex - 1];
|
|
|
|
- const monthOrder = monthCur.order;
|
|
|
|
- monthCur.order = monthUp.order;
|
|
|
|
- monthUp.order = monthOrder;
|
|
|
|
- monthsList.sort(function (a, b) {
|
|
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ const pre = sheet.zh_data[row - 1], preUpdate = {id: pre.id};
|
|
|
|
+ for (let iRow = 0; iRow < count; iRow++) {
|
|
|
|
+ const posData = sheet.zh_data[iRow + row];
|
|
|
|
+ if (posData) {
|
|
|
|
+ data.postData.push({id: posData.id, order: sheet.zh_data[iRow + row - 1].order});
|
|
|
|
+ preUpdate.order = posData.order;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ console.log(monthsList);
|
|
|
|
+ data.postData.push(preUpdate);
|
|
|
|
+ console.log(data);
|
|
|
|
+ if (data.postData.length > 0) {
|
|
|
|
+ postData(window.location.pathname + '/save', data, function () {
|
|
|
|
+ _.forEach(data.postData, function (item) {
|
|
|
|
+ const cl = _.find(materialBillsData, { id: item.id });
|
|
|
|
+ cl.order = item.order;
|
|
|
|
+ });
|
|
|
|
+ materialBillsData.sort(function (a, b) {
|
|
return a.order - b.order
|
|
return a.order - b.order
|
|
});
|
|
});
|
|
- const materialMonthSheet = materialMonthSpread.getActiveSheet();
|
|
|
|
- SpreadJsObj.reLoadSheetData(materialMonthSheet);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ SpreadJsObj.reLoadSheetData(sheet);
|
|
|
|
+ const sel = selection[0];
|
|
|
|
+ if (sel) {
|
|
|
|
+ sheet.setSelection(sheet.zh_data.indexOf(first), sel.col, sel.rowCount, sel.colCount);
|
|
|
|
+ }
|
|
|
|
+ if (months.length > 0) {
|
|
|
|
+ _.forEach(data.postData, function (item) {
|
|
|
|
+ const cl = _.find(monthsList, { mb_id: item.id });
|
|
|
|
+ cl.order = item.order;
|
|
|
|
+ });
|
|
|
|
+ monthsList.sort(function (a, b) {
|
|
|
|
+ return a.order - b.order
|
|
|
|
+ });
|
|
|
|
+ const materialMonthSheet = materialMonthSpread.getActiveSheet();
|
|
|
|
+ SpreadJsObj.reLoadSheetData(materialMonthSheet);
|
|
|
|
+ }
|
|
|
|
+ materialSpreadObj.refreshActn();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
},
|
|
},
|
|
downMove: function () {
|
|
downMove: function () {
|
|
if($('#bills0_list').is(':checked')) {
|
|
if($('#bills0_list').is(':checked')) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- const sheet = materialSpread.getActiveSheet();
|
|
|
|
- const cur = SpreadJsObj.getSelectObject(sheet);
|
|
|
|
- const down = materialBillsData[materialBillsData.indexOf(cur) + 1];
|
|
|
|
- const mbIndex = materialBillsData.indexOf(cur);
|
|
|
|
- postData(window.location.pathname + '/save', {
|
|
|
|
|
|
+ const data = {
|
|
type: 'changeOrder',
|
|
type: 'changeOrder',
|
|
- id1: cur.id,
|
|
|
|
- id2: down.id
|
|
|
|
- }, function () {
|
|
|
|
- const order = cur.order;
|
|
|
|
- cur.order = down.order;
|
|
|
|
- down.order = order;
|
|
|
|
- materialBillsData.sort(function (a, b) {
|
|
|
|
- return a.order - b.order
|
|
|
|
- });
|
|
|
|
- SpreadJsObj.reLoadSheetData(sheet);
|
|
|
|
- const sel = sheet.getSelections();
|
|
|
|
- const index = materialBillsData.indexOf(cur);
|
|
|
|
- sheet.setSelection(index, sel.length > 0 ? sel[0].col : 0, 1, 1);
|
|
|
|
|
|
+ postData: [],
|
|
|
|
+ };
|
|
|
|
+ const sheet = materialSpread.getActiveSheet();
|
|
|
|
+ const selection = sheet.getSelections();
|
|
|
|
+ const row = selection[0].row, count = selection[0].rowCount;
|
|
|
|
+ const first = sheet.zh_data[row];
|
|
|
|
+ if (!first) {
|
|
materialSpreadObj.refreshActn();
|
|
materialSpreadObj.refreshActn();
|
|
- if (months.length > 0) {
|
|
|
|
- const monthCur = monthsList[mbIndex];
|
|
|
|
- const monthDown = monthsList[mbIndex + 1];
|
|
|
|
- const monthOrder = monthCur.order;
|
|
|
|
- monthCur.order = monthDown.order;
|
|
|
|
- monthDown.order = monthOrder;
|
|
|
|
- monthsList.sort(function (a, b) {
|
|
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ const next = sheet.zh_data[row + count], nextUpdate = {id: next.id};
|
|
|
|
+ for (let iRow = count - 1; iRow >= 0; iRow--) {
|
|
|
|
+ const posData = sheet.zh_data[iRow + row];
|
|
|
|
+ if (posData) {
|
|
|
|
+ data.postData.push({id: posData.id, order: sheet.zh_data[iRow + row + 1].order});
|
|
|
|
+ nextUpdate.order = posData.order;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ data.postData.push(nextUpdate);
|
|
|
|
+ console.log(data);
|
|
|
|
+ if (data.postData.length > 0) {
|
|
|
|
+ postData(window.location.pathname + '/save', data, function () {
|
|
|
|
+ _.forEach(data.postData, function (item) {
|
|
|
|
+ const cl = _.find(materialBillsData, { id: item.id });
|
|
|
|
+ cl.order = item.order;
|
|
|
|
+ });
|
|
|
|
+ materialBillsData.sort(function (a, b) {
|
|
return a.order - b.order
|
|
return a.order - b.order
|
|
});
|
|
});
|
|
- const materialMonthSheet = materialMonthSpread.getActiveSheet();
|
|
|
|
- SpreadJsObj.reLoadSheetData(materialMonthSheet);
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ SpreadJsObj.reLoadSheetData(sheet);
|
|
|
|
+ const sel = selection[0];
|
|
|
|
+ if (sel) {
|
|
|
|
+ sheet.setSelection(sheet.zh_data.indexOf(first), sel.col, sel.rowCount, sel.colCount);
|
|
|
|
+ }
|
|
|
|
+ if (months.length > 0) {
|
|
|
|
+ _.forEach(data.postData, function (item) {
|
|
|
|
+ const cl = _.find(monthsList, { mb_id: item.id });
|
|
|
|
+ cl.order = item.order;
|
|
|
|
+ });
|
|
|
|
+ monthsList.sort(function (a, b) {
|
|
|
|
+ return a.order - b.order
|
|
|
|
+ });
|
|
|
|
+ const materialMonthSheet = materialMonthSpread.getActiveSheet();
|
|
|
|
+ SpreadJsObj.reLoadSheetData(materialMonthSheet);
|
|
|
|
+ }
|
|
|
|
+ materialSpreadObj.refreshActn();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
},
|
|
},
|
|
selectionChanged: function (e, info) {
|
|
selectionChanged: function (e, info) {
|
|
const sel = info.sheet.getSelections()[0];
|
|
const sel = info.sheet.getSelections()[0];
|
|
@@ -1497,6 +1536,114 @@ $(document).ready(() => {
|
|
materialSpreadObj.refreshActn();
|
|
materialSpreadObj.refreshActn();
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ let gljLib;
|
|
|
|
+ const gljLibCellDoubleClick = function (e, info) {
|
|
|
|
+ if (readOnly) return;
|
|
|
|
+ const gljSheet = info.sheet;
|
|
|
|
+ if (!gljSheet.zh_setting || !gljSheet.zh_tree) { return; }
|
|
|
|
+
|
|
|
|
+ const gljTree = gljSheet.zh_tree;
|
|
|
|
+ const gljNode = gljTree.nodes[info.row];
|
|
|
|
+ const sheet = materialSpread.getActiveSheet();
|
|
|
|
+ const select = SpreadJsObj.getSelectObject(sheet);
|
|
|
|
+ if (!gljNode) return;
|
|
|
|
+
|
|
|
|
+ if (gljNode && gljNode.is_leaf === 0) {
|
|
|
|
+ toastr.warning('非最底层项目下,不应添加');
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ postData(window.location.pathname + '/save', { type:'add-glj', postData: gljNode, order: select ? select.order : null }, function (result) {
|
|
|
|
+ if (result) {
|
|
|
|
+ // 比order大的+1
|
|
|
|
+ const maxData = select ? _.filter(materialBillsData, (item) => { return item.order > select.order }) : [];
|
|
|
|
+ _.forEach(maxData, function (item) {
|
|
|
|
+ const cl = _.find(materialBillsData, { id: item.id });
|
|
|
|
+ cl.order = item.order + 1;
|
|
|
|
+ });
|
|
|
|
+ materialBillsData.push(result.info);
|
|
|
|
+ materialBillsData.sort(function (a, b) {
|
|
|
|
+ return a.order - b.order
|
|
|
|
+ });
|
|
|
|
+ console.log(materialBillsData);
|
|
|
|
+ if (isStageSelf) {
|
|
|
|
+ materialSpreadObj.updateMaterialData(result);
|
|
|
|
+ materialSpreadObj.getMaterialBillsData();
|
|
|
|
+ }
|
|
|
|
+ // sheet.addRows(materialBillsData.length - 1, 1);
|
|
|
|
+ // SpreadJsObj.reLoadRowData(sheet, materialBillsData.length - 1);
|
|
|
|
+ let newMaterialBillsData = materialBillsData;
|
|
|
|
+ if($('#bills0_list').is(':checked')) {
|
|
|
|
+ newMaterialBillsData = _.filter(materialBillsData, function (item) {
|
|
|
|
+ return item.quantity !== null && item.quantity !== 0;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ SpreadJsObj.loadSheetData(materialSpread.getActiveSheet(), SpreadJsObj.DataType.Data, newMaterialBillsData);
|
|
|
|
+ // materialSpreadObj.materialSheetReset();
|
|
|
|
+ sheet.setSelection(sheet.zh_data.indexOf(select) + 1, 0, 1, 1);
|
|
|
|
+ materialSpreadObj.refreshActn();
|
|
|
|
+ // 月信息价需要同时添加空白的list
|
|
|
|
+ if (months.length > 0) {
|
|
|
|
+ const one_month ={ mb_id: result.info.id, code: result.info.code, name: result.info.name, origin: result.info.origin, unit: result.info.unit, order: result.info.order };
|
|
|
|
+ for (const m of months) {
|
|
|
|
+ one_month[m] = null;
|
|
|
|
+ }
|
|
|
|
+ _.forEach(maxData, function (item) {
|
|
|
|
+ const cl = _.find(monthsList, { mb_id: item.id });
|
|
|
|
+ cl.order = item.order + 1;
|
|
|
|
+ });
|
|
|
|
+ monthsList.push(one_month);
|
|
|
|
+ monthsList.sort(function (a, b) {
|
|
|
|
+ return a.order - b.order
|
|
|
|
+ });
|
|
|
|
+ console.log(monthsList);
|
|
|
|
+ // const newMonthsList = _.filter(monthsList, function (item) {
|
|
|
|
+ // return _.findIndex(newMaterialBillsData, { code: item.code }) !== -1;
|
|
|
|
+ // });
|
|
|
|
+ // materialMonthSpread.getActiveSheet().addRows(newMonthsList.length - 1, 1);
|
|
|
|
+ // SpreadJsObj.reLoadRowData(materialMonthSpread.getActiveSheet(), newMonthsList.length - 1);
|
|
|
|
+ monthFunGather.monthsListSet();
|
|
|
|
+ // materialMonthSpreadObj.monthsListSet();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ };
|
|
|
|
+ const gljLibSetting = {
|
|
|
|
+ selector: '#material-tab',
|
|
|
|
+ stdType: 'glj',
|
|
|
|
+ libs: gljLists,
|
|
|
|
+ treeSetting: {
|
|
|
|
+ id: 'glj_id',
|
|
|
|
+ pid: 'glj_pid',
|
|
|
|
+ order: 'order',
|
|
|
|
+ level: 'level',
|
|
|
|
+ rootId: -1,
|
|
|
|
+ keys: ['id', 'list_id', 'glj_id'],
|
|
|
|
+ },
|
|
|
|
+ spreadSetting: {
|
|
|
|
+ cols: [
|
|
|
|
+ {title: '编号', field: 'code', hAlign: 0, width: 120, formatter: '@', readOnly: true, cellType: 'tree'},
|
|
|
|
+ {title: '名称', field: 'name', hAlign: 0, width: 150, formatter: '@', readOnly: true},
|
|
|
|
+ {title: '单位', field: 'unit', hAlign: 1, width: 50, formatter: '@', readOnly: true},
|
|
|
|
+ {title: '参考上涨幅度', field: 'rise_range', hAlign: 1, width: 50, formatter: '@', readOnly: true},
|
|
|
|
+ {title: '参考下跌幅度', field: 'fall_range', hAlign: 1, width: 50, formatter: '@', readOnly: true},
|
|
|
|
+ ],
|
|
|
|
+ treeCol: 0,
|
|
|
|
+ emptyRows: 0,
|
|
|
|
+ headRows: 1,
|
|
|
|
+ headRowHeight: [32],
|
|
|
|
+ defaultRowHeight: 21,
|
|
|
|
+ headerFont: '12px 微软雅黑',
|
|
|
|
+ font: '12px 微软雅黑',
|
|
|
|
+ headColWidth: [30],
|
|
|
|
+ selectedBackColor: '#fffacd',
|
|
|
|
+ },
|
|
|
|
+ spreadClassCss: 'sjs-material',
|
|
|
|
+ cellDoubleClick: gljLibCellDoubleClick,
|
|
|
|
+ page: 'material',
|
|
|
|
+ tid: window.location.pathname.split('/')[2],
|
|
|
|
+ };
|
|
|
|
+
|
|
$.subMenu({
|
|
$.subMenu({
|
|
menu: '#sub-menu', miniMenu: '#sub-mini-menu', miniMenuList: '#mini-menu-list',
|
|
menu: '#sub-menu', miniMenu: '#sub-mini-menu', miniMenuList: '#mini-menu-list',
|
|
toMenu: '#to-menu', toMiniMenu: '#to-mini-menu',
|
|
toMenu: '#to-menu', toMiniMenu: '#to-mini-menu',
|
|
@@ -1520,6 +1667,7 @@ $(document).ready(() => {
|
|
callback: function () {
|
|
callback: function () {
|
|
materialSpread.refresh();
|
|
materialSpread.refresh();
|
|
materialMonthSpread.refresh();
|
|
materialMonthSpread.refresh();
|
|
|
|
+ if (gljLib) gljLib.spread.refresh();
|
|
const width = (($('#right-view').width()/$('#right-view').parent('div').width())*100).toFixed();
|
|
const width = (($('#right-view').width()/$('#right-view').parent('div').width())*100).toFixed();
|
|
setLocalCache('material_month_' + materialID, width);
|
|
setLocalCache('material_month_' + materialID, width);
|
|
}
|
|
}
|
|
@@ -1533,10 +1681,10 @@ $(document).ready(() => {
|
|
const height = $('.bcontent-wrap').height();
|
|
const height = $('.bcontent-wrap').height();
|
|
const cutHeight = isStageSelf ? getObjHeight($('#myTab')) : 0;
|
|
const cutHeight = isStageSelf ? getObjHeight($('#myTab')) : 0;
|
|
$('.sjs-height-material').height($('.sjs-height-1').height() - cutHeight);
|
|
$('.sjs-height-material').height($('.sjs-height-1').height() - cutHeight);
|
|
- $('.sjs-height-material-month').height($('.sjs-height-1').height() - getObjHeight($('.sjs-bar-1')));
|
|
|
|
- $('.material-table-height').height($('.bcontent-wrap').height() - getObjHeight($('.bc-bar')));
|
|
|
|
|
|
+ updateSjsHeight();
|
|
materialSpread.refresh();
|
|
materialSpread.refresh();
|
|
materialMonthSpread.refresh();
|
|
materialMonthSpread.refresh();
|
|
|
|
+ if (gljLib) gljLib.spread.refresh();
|
|
setLocalCache('material_bills_' + materialID, height);
|
|
setLocalCache('material_bills_' + materialID, height);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -1547,7 +1695,7 @@ $(document).ready(() => {
|
|
const tab = $(this), tabPanel = $(tab.attr('content'));
|
|
const tab = $(this), tabPanel = $(tab.attr('content'));
|
|
if (!tab.hasClass('active')) {
|
|
if (!tab.hasClass('active')) {
|
|
$('a', '.side-menu').removeClass('active');
|
|
$('a', '.side-menu').removeClass('active');
|
|
- $('.tab-content .tab-select-show').removeClass('active');
|
|
|
|
|
|
+ $('.tab-content .tab-pane').removeClass('active');
|
|
tab.addClass('active');
|
|
tab.addClass('active');
|
|
tabPanel.addClass('active');
|
|
tabPanel.addClass('active');
|
|
showSideTools(tab.hasClass('active'));
|
|
showSideTools(tab.hasClass('active'));
|
|
@@ -1555,6 +1703,12 @@ $(document).ready(() => {
|
|
const width = (($('#right-view').width()/$('#right-view').parent('div').width())*100).toFixed();
|
|
const width = (($('#right-view').width()/$('#right-view').parent('div').width())*100).toFixed();
|
|
setLocalCache('material_month_' + materialID, width);
|
|
setLocalCache('material_month_' + materialID, width);
|
|
materialMonthSpread.refresh();
|
|
materialMonthSpread.refresh();
|
|
|
|
+ } else if (tab.attr('content') === '#material-tab') {
|
|
|
|
+ if (!gljLib) {
|
|
|
|
+ gljLib = $.gljLib(gljLibSetting);
|
|
|
|
+ }
|
|
|
|
+ updateSjsHeight();
|
|
|
|
+ gljLib.spread.refresh();
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
removeLocalCache('material_month_' + materialID);
|
|
removeLocalCache('material_month_' + materialID);
|
|
@@ -1563,13 +1717,13 @@ $(document).ready(() => {
|
|
showSideTools(tab.hasClass('active'));
|
|
showSideTools(tab.hasClass('active'));
|
|
}
|
|
}
|
|
materialSpread.refresh();
|
|
materialSpread.refresh();
|
|
- materialMonthSpread.refresh();
|
|
|
|
|
|
+ // materialMonthSpread.refresh();
|
|
});
|
|
});
|
|
// 根据浏览器记录展开收起
|
|
// 根据浏览器记录展开收起
|
|
if (getLocalCache('material_month_' + materialID) && !isStageSelf) {
|
|
if (getLocalCache('material_month_' + materialID) && !isStageSelf) {
|
|
const tab = $('.right-nav a[content="#month-tab"]'), tabPanel = $(tab.attr('content'));
|
|
const tab = $('.right-nav a[content="#month-tab"]'), tabPanel = $(tab.attr('content'));
|
|
$('a', '.side-menu').removeClass('active');
|
|
$('a', '.side-menu').removeClass('active');
|
|
- $('.tab-content .tab-select-show').removeClass('active');
|
|
|
|
|
|
+ $('.tab-content .tab-pane').removeClass('active');
|
|
tab.addClass('active');
|
|
tab.addClass('active');
|
|
tabPanel.addClass('active');
|
|
tabPanel.addClass('active');
|
|
$('#right-view').width(getLocalCache('material_month_' + materialID) + '%');
|
|
$('#right-view').width(getLocalCache('material_month_' + materialID) + '%');
|
|
@@ -1585,16 +1739,22 @@ $(document).ready(() => {
|
|
$(".sp-wrap").height(bcontent-30);
|
|
$(".sp-wrap").height(bcontent-30);
|
|
$('.sjs-height-1').height($(window).height()-cHeader-bcontent-90+53);
|
|
$('.sjs-height-1').height($(window).height()-cHeader-bcontent-90+53);
|
|
$('.sjs-height-material').height($('.sjs-height-1').height() - cutHeight);
|
|
$('.sjs-height-material').height($('.sjs-height-1').height() - cutHeight);
|
|
- $('.sjs-height-material-month').height($('.sjs-height-1').height() - getObjHeight($('.sjs-bar-1')));
|
|
|
|
- $('.material-table-height').height($('.bcontent-wrap').height() - getObjHeight($('.bc-bar')));
|
|
|
|
|
|
+ updateSjsHeight();
|
|
materialSpread.refresh();
|
|
materialSpread.refresh();
|
|
materialMonthSpread.refresh();
|
|
materialMonthSpread.refresh();
|
|
|
|
+ if (gljLib) gljLib.spread.refresh();
|
|
} else {
|
|
} else {
|
|
$('.sjs-height-material').height($('.sjs-height-1').height() - cutHeight);
|
|
$('.sjs-height-material').height($('.sjs-height-1').height() - cutHeight);
|
|
- $('.sjs-height-material-month').height($('.sjs-height-1').height() - getObjHeight($('.sjs-bar-1')));
|
|
|
|
- $('.material-table-height').height($('.bcontent-wrap').height() - getObjHeight($('.bc-bar')));
|
|
|
|
|
|
+ updateSjsHeight();
|
|
materialSpread.refresh();
|
|
materialSpread.refresh();
|
|
materialMonthSpread.refresh();
|
|
materialMonthSpread.refresh();
|
|
|
|
+ if (gljLib) gljLib.spread.refresh();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function updateSjsHeight() {
|
|
|
|
+ $('.sjs-height-material-month').height($('.sjs-height-1').height() - getObjHeight($('.sjs-bar-1')));
|
|
|
|
+ $('.material-table-height').height($('.bcontent-wrap').height() - getObjHeight($('.bc-bar')));
|
|
|
|
+ $('.sjs-material').height($('.sjs-height-1').height() - getObjHeight($('.sjs-bar')));
|
|
}
|
|
}
|
|
function getObjHeight(select) {
|
|
function getObjHeight(select) {
|
|
return select.length > 0 ? select.height() : 0;
|
|
return select.length > 0 ? select.height() : 0;
|