|
@@ -200,10 +200,11 @@ $(document).ready(() => {
|
|
|
resetXmjSpread: function(data = null) {
|
|
|
const xmj = [];
|
|
|
if (data && data.lid != 0 && data.xmj_code !== '' && data.xmj_code !== null) {
|
|
|
- if (data.bwmx === data.xmj_jldy) {
|
|
|
- data.bwmx = '';
|
|
|
+ const newData = JSON.parse(JSON.stringify(data));
|
|
|
+ if (newData.bwmx === newData.xmj_jldy) {
|
|
|
+ newData.bwmx = '';
|
|
|
}
|
|
|
- xmj.push(data);
|
|
|
+ xmj.push(newData);
|
|
|
}
|
|
|
SpreadJsObj.loadSheetData(xmjSpread.getActiveSheet(), SpreadJsObj.DataType.Data, xmj);
|
|
|
},
|
|
@@ -392,7 +393,6 @@ $(document).ready(() => {
|
|
|
dealBillList.splice(exist_index, 1);
|
|
|
}
|
|
|
}
|
|
|
- console.log(gclGatherData.concat(dealBillList));
|
|
|
changeListData = gclGatherData.concat(dealBillList).sort(sortByCode);
|
|
|
console.log(changeListData);
|
|
|
// 先加载台账数据
|
|
@@ -424,6 +424,41 @@ $(document).ready(() => {
|
|
|
SpreadJsObj.initSpreadSettingEvents(changeSpreadSetting, changeCol);
|
|
|
SpreadJsObj.initSheet(changeSpreadSheet, changeSpreadSetting);
|
|
|
SpreadJsObj.loadSheetData(changeSpreadSheet, SpreadJsObj.DataType.Data, changeList);
|
|
|
+ // changeSpreadSheet.options.protectionOptions = {
|
|
|
+ // allowSort: true,
|
|
|
+ // allowFilter: true
|
|
|
+ // };
|
|
|
+ // var option = changeSpreadSheet.options.protectionOptions;
|
|
|
+ // changeSpreadSheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(-1, 0, -1, changeSpreadSetting.cols.length)));
|
|
|
+ // // changeSpreadSheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(-1, 0, -1, 3)));
|
|
|
+ // const filter = changeSpreadSheet.rowFilter();
|
|
|
+ // filter.filterButtonVisible(false);
|
|
|
+ // filter.filterButtonVisible(0, true);
|
|
|
+ // filter.filterButtonVisible(2, true);
|
|
|
+ // filter.filterDialogVisibleInfo({
|
|
|
+ // sortByValue: true, //SortByValue item is visible.
|
|
|
+ // sortByColor: false, //SortByColor item is visible.
|
|
|
+ // filterByColor: false, //FilterByColor item is visible.
|
|
|
+ // filterByValue: false, //FilterByValue item is visible.
|
|
|
+ // listFilterArea: false //ListFilterArea item is visible.
|
|
|
+ // });
|
|
|
+ // function compareList(obj1, obj2) {
|
|
|
+ // console.log(obj1, obj2);
|
|
|
+ // var list = ["", '204-1-b', '合计'];
|
|
|
+ // var index1 = list.indexOf(obj1), index2 = list.indexOf(obj2);
|
|
|
+ // if (index1 > index2) {
|
|
|
+ // return 1;
|
|
|
+ // } else if (index1 < index2) {
|
|
|
+ // return -1;
|
|
|
+ // } else {
|
|
|
+ // return 0;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // changeSpreadSheet.sortRange(0, 0, changeSpreadSetting.cols.length, 1, true, [{index: 0, ascending: true, compareFunction: compareList}]);
|
|
|
+ // changeSpreadSheet.bind(GC.Spread.Sheets.Events.RangeSorting, function (e, info) {
|
|
|
+ // info.compareFunction = compareList;
|
|
|
+ // });
|
|
|
+ // filter.sortColumn(0, true);
|
|
|
changeSpreadObj.makeSjsFooter();
|
|
|
changeSpreadObj.resetXmjSpread(SpreadJsObj.getSelectObject(changeSpreadSheet));
|
|
|
});
|