|
@@ -573,8 +573,10 @@ $(document).ready(() => {
|
|
|
cLData.camount = ZhCalc.round(sortData[curRow].camount, findDecimal(unitdecimal)) || 0;
|
|
|
cLData.oamount = ZhCalc.round(sortData[curRow].oamount, findDecimal(unitdecimal)) || 0;
|
|
|
}
|
|
|
- cLData[colSetting.field] = validText;
|
|
|
- sortData[curRow][colSetting.field] = validText;
|
|
|
+ if (colSetting.field !== 'oa_tp' && colSetting.field !== 'ca_tp') {
|
|
|
+ cLData[colSetting.field] = validText;
|
|
|
+ sortData[curRow][colSetting.field] = validText;
|
|
|
+ }
|
|
|
cLData.spamount = ZhCalc.round(sortData[curRow].camount, findDecimal(unitdecimal)) || 0;
|
|
|
}
|
|
|
if (bPaste) {
|
|
@@ -726,7 +728,7 @@ $(document).ready(() => {
|
|
|
const delCommand = {
|
|
|
canUndo: false,
|
|
|
execute: function (context, options, isUndo) {
|
|
|
- var Commands = GC.Spread.Sheets.Commands;
|
|
|
+ const Commands = GC.Spread.Sheets.Commands;
|
|
|
const sel = changeSpreadSheet.getSelections()[0];
|
|
|
const col = changeSpreadSheet.zh_setting.cols[sel.col];
|
|
|
if (col && col.field !== 'ca_tp') {
|
|
@@ -743,9 +745,33 @@ $(document).ready(() => {
|
|
|
}
|
|
|
}
|
|
|
};
|
|
|
+ const delCommand2 = {
|
|
|
+ canUndo: false,
|
|
|
+ execute: function (context, options, isUndo) {
|
|
|
+ const Commands = GC.Spread.Sheets.Commands;
|
|
|
+ const sel = changeSpreadSheet.getSelections()[0];
|
|
|
+ const col = changeSpreadSheet.zh_setting.cols[sel.col];
|
|
|
+ if (col && col.field !== 'del_list') {
|
|
|
+ isUndo = true;
|
|
|
+ }
|
|
|
+ if (isUndo) {
|
|
|
+ Commands.undoTransaction(context, options);
|
|
|
+ return true;
|
|
|
+ } else {
|
|
|
+ Commands.startTransaction(context, options);
|
|
|
+
|
|
|
+ Commands.endTransaction(context, options);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
const commandManager = changeSpread.commandManager();
|
|
|
commandManager.register('banDel', delCommand);
|
|
|
+ commandManager.register('banDel2', delCommand2);
|
|
|
+ commandManager.register('banDel3', _.cloneDeep(delCommand2));// 不能共用banDel2
|
|
|
commandManager.setShortcutKey('banDel', 39, false, false, false, false);// 改写键盘右键,防止删除清单
|
|
|
+ commandManager.setShortcutKey('banDel2', 40, false, false, false, false);// 改写键盘下键,防止删除清单
|
|
|
+ commandManager.setShortcutKey('banDel3', 38, false, false, false, false);// 改写键盘上键,防止删除清单
|
|
|
let batchInsertObj;
|
|
|
$.contextMenu.types.batchInsert = function (item, opt, root) {
|
|
|
const self = this;
|
|
@@ -1165,7 +1191,6 @@ $(document).ready(() => {
|
|
|
$('#list-input').on('blur', function () {
|
|
|
const select = parseInt($('#select-list').val());
|
|
|
const value = _.trim($(this).val());
|
|
|
- console.log(value);
|
|
|
const valueList = _.slice(_.without(_.uniq(_.replace(_.replace(value, /\'|\"/g, ''), /\t/g, ' ').split(' ')), ''), 0, 10);
|
|
|
console.log(valueList);
|
|
|
// 判断是否存在多个分词,以换行或空格分隔,多个则显示左侧菜单
|