|
@@ -1056,6 +1056,8 @@ var gljOprObj = {
|
|
|
type: this.pagingType.stdGLJ,
|
|
|
// 替换数据,替换操作下有数据:编码、名称、规格、单位、类型
|
|
|
replace: null,
|
|
|
+ // 添加组成物的查询扩展
|
|
|
+ queryExtend: {},
|
|
|
// 所在分类节点
|
|
|
classList: [],
|
|
|
// 搜索文本
|
|
@@ -1075,6 +1077,8 @@ var gljOprObj = {
|
|
|
unit: selected.unit,
|
|
|
gljType: selected.type
|
|
|
};
|
|
|
+ } else if (actionType === 'addMix') {
|
|
|
+ condition.queryExtend = projectGljObject.getQueryExtForMixRatio();
|
|
|
}
|
|
|
if (init) {
|
|
|
return condition;
|
|
@@ -1640,9 +1644,12 @@ $(function () {
|
|
|
let gljClass = 0,
|
|
|
selected,
|
|
|
connect_key;
|
|
|
- if ($('#actionType').val() == 'add' || $('#actionType').val() == 'insert') {//插入,添加
|
|
|
+ const actionType = $('#actionType').val();
|
|
|
+ const addActions = ['add', 'insert', 'addMix'];
|
|
|
+ const replaceActions = ['m_replace', 'replace'];
|
|
|
+ if (addActions.includes(actionType)) {//插入,添加,添加组成物(项目人材机页面)
|
|
|
gljOprObj.GLJSelection = [];
|
|
|
- } else if($('#actionType').val() =='m_replace' || $('#actionType').val() == 'replace'){//替换、批量替换
|
|
|
+ } else if(replaceActions.includes(actionType)){//替换、批量替换
|
|
|
selected = gljOprObj.sheetData[gljContextMenu.selectedRow];
|
|
|
connect_key = gljOprObj.getIndex(selected, gljKeyArray);
|
|
|
gljOprObj.GLJSelection = [connect_key];
|
|
@@ -1652,12 +1659,9 @@ $(function () {
|
|
|
gljClass = locatedItem.gljClass;
|
|
|
locatedItem.select = 1;
|
|
|
}
|
|
|
- } else if($('#actionType').val() =='addMix'){//添加组成物
|
|
|
- gljOprObj.GLJSelection = [];
|
|
|
- projectGljObject.filterLibGLJForMixRatio();
|
|
|
}
|
|
|
//替换,焦点定位至当前选中人材机
|
|
|
- if ($('#actionType').val() =='m_replace' || $('#actionType').val() == 'replace') {
|
|
|
+ if (replaceActions.includes(actionType)) {
|
|
|
gljOprObj.locateZTree(gljClass);
|
|
|
sheetCommonObj.appendData(gljOprObj.gljLibSheet, 0, 0, gljOprObj.gljLibSheetSetting, gljOprObj.AllRecode);
|
|
|
const index = gljOprObj.AllRecode.findIndex(item => gljOprObj.getIndex(item, gljLibKeyArray) === connect_key);
|
|
@@ -1665,7 +1669,7 @@ $(function () {
|
|
|
gljOprObj.gljLibSheet.setActiveCell(index, 0);
|
|
|
gljOprObj.initSelection({row: index});
|
|
|
gljOprObj.gljLibSpresd.focus(true);
|
|
|
- } else if ($('#actionType').val() === 'add') {
|
|
|
+ } else if (actionType === 'add' || actionType === 'addMix') {
|
|
|
gljOprObj.locateZTree(null);
|
|
|
sheetCommonObj.appendData(gljOprObj.gljLibSheet, 0, 0, gljOprObj.gljLibSheetSetting, gljOprObj.AllRecode);
|
|
|
gljOprObj.gljLibSheet.showRow(0, GC.Spread.Sheets.VerticalPosition.top);
|