|
|
@@ -1000,7 +1000,7 @@ var gljOprObj = {
|
|
|
}
|
|
|
},
|
|
|
setGLJSelection: function (args, newVal) {
|
|
|
- if ($('#actionType').val() == 'add' || $('#actionType').val() == 'insert'|| $('#actionType').val() == 'addMix') {
|
|
|
+ if ($('#actionType').val() == 'add' || $('#actionType').val() == 'insert'|| $('#actionType').val() == 'insertEquipment' || $('#actionType').val() == 'addMix') {
|
|
|
this.addGLJsSelection(args, newVal);
|
|
|
} else {
|
|
|
this.replaceGLJSelection(args, newVal);
|
|
|
@@ -1439,7 +1439,7 @@ $(function () {
|
|
|
}
|
|
|
gljOprObj.gljLibSheetData = gljOprObj.AllRecode;
|
|
|
let gljClass = 0, selectMap = {};
|
|
|
- if ($('#actionType').val() == 'add' || $('#actionType').val() == 'insert') {//插入,添加
|
|
|
+ if ($('#actionType').val() == 'add' || $('#actionType').val() == 'insert' || $('#actionType').val() == 'insertEquipment') {//插入,添加
|
|
|
gljOprObj.GLJSelection = [];
|
|
|
} else if($('#actionType').val() =='m_replace' || $('#actionType').val() == 'replace'){//替换、批量替换
|
|
|
let selected = gljOprObj.sheetData[gljContextMenu.selectedRow];
|
|
|
@@ -1474,8 +1474,20 @@ $(function () {
|
|
|
gljOprObj.gljLibSheet.setActiveCell(index, 0);
|
|
|
gljOprObj.initSelection({row: index});
|
|
|
gljOprObj.gljLibSpresd.focus(true);
|
|
|
+ } else if ($('#actionType').val() === 'insertEquipment') {//右键插入设备,人材机选择窗口,应默认固定到分类"养护管理设备"。
|
|
|
+ let locateClass = gljOprObj.treeData.std.find(function (stdClass) {
|
|
|
+ return stdClass.Name === '养护管理设备';
|
|
|
+ });
|
|
|
+ if (locateClass) {
|
|
|
+ gljClass = locateClass.ID;
|
|
|
+ gljOprObj.locateZTree(gljClass);
|
|
|
+ gljOprObj.gljLibSheet.showRow(0, GC.Spread.Sheets.VerticalPosition.top);
|
|
|
+ gljOprObj.gljLibSheet.setActiveCell(0, 0);
|
|
|
+ gljOprObj.initSelection({row: 0});
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ gljOprObj.showLibGLJSheetData();
|
|
|
}
|
|
|
- else gljOprObj.showLibGLJSheetData();
|
|
|
});
|
|
|
|
|
|
$('#glj_tree_div').on('hidden.bs.modal', function () {
|
|
|
@@ -1522,7 +1534,7 @@ $(function () {
|
|
|
if (gljOprObj.GLJSelection.length < 1) {
|
|
|
return;
|
|
|
}
|
|
|
- if ($('#actionType').val() == 'insert') { //造价书页面中插入定额类型的工料机
|
|
|
+ if (['insert', 'insertEquipment'].includes($('#actionType').val())) { //造价书页面中插入定额类型的工料机
|
|
|
gljOprObj.doInsertGLJ();
|
|
|
} else if ($('#actionType').val() == 'add') { //添加工料机
|
|
|
gljOprObj.doAddGLJ();
|