|
@@ -43,38 +43,43 @@ let componentOprObj = {
|
|
|
let thisComponent = me.currentCache[args.row];
|
|
|
thisComponent.isChecked = val;
|
|
|
console.log(val);
|
|
|
- //维护选中组成物列表
|
|
|
- if(val === true){
|
|
|
- //解决复选框编辑状态的暂时方法todo
|
|
|
- let isExist = false;
|
|
|
- for(let i = 0, len = me.selectedList.length; i < len; i++){
|
|
|
- if(me.selectedList[i].ID === thisComponent.ID){
|
|
|
- isExist = true;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- if(!isExist){
|
|
|
- me.selectedList.push(thisComponent);
|
|
|
- }
|
|
|
+ if(args.sheet.isEditing()){
|
|
|
+ args.sheet.endEdit(true);
|
|
|
}
|
|
|
- else if(val === false){
|
|
|
- for(let i = 0, len = me.selectedList.length; i < len; i++){
|
|
|
- if(me.selectedList[i].ID === thisComponent.ID){
|
|
|
- me.selectedList.splice(i, 1);
|
|
|
- break;
|
|
|
+ else{
|
|
|
+ //维护选中组成物列表
|
|
|
+ if(val === true){
|
|
|
+ //解决复选框编辑状态的暂时方法todo
|
|
|
+ let isExist = false;
|
|
|
+ for(let i = 0, len = me.selectedList.length; i < len; i++){
|
|
|
+ if(me.selectedList[i].ID === thisComponent.ID){
|
|
|
+ isExist = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(!isExist){
|
|
|
+ me.selectedList.push(thisComponent);
|
|
|
}
|
|
|
}
|
|
|
- if($("input[name='glj']:checked").val() === 'selectedGljs'){//radio为已选工料机时
|
|
|
- me.showGljList = [];
|
|
|
- me.setShowGljList(me.selectedList, false);
|
|
|
- re.sortGlj(me.showGljList);
|
|
|
- //重新显示
|
|
|
- me.showGljItems(me.showGljList, me.gljCurTypeId);
|
|
|
- if (re.parentNodeIds["_pNodeId_" + me.gljCurTypeId]) {//更新cache
|
|
|
- me.currentOprParent = 1;
|
|
|
- me.currentCache = me.getParentCache(re.parentNodeIds["_pNodeId_" + me.gljCurTypeId]);
|
|
|
- } else {
|
|
|
- me.currentCache = me.getCache();
|
|
|
+ else if(val === false){
|
|
|
+ for(let i = 0, len = me.selectedList.length; i < len; i++){
|
|
|
+ if(me.selectedList[i].ID === thisComponent.ID){
|
|
|
+ me.selectedList.splice(i, 1);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if($("input[name='glj']:checked").val() === 'selectedGljs'){//radio为已选工料机时
|
|
|
+ me.showGljList = [];
|
|
|
+ me.setShowGljList(me.selectedList, false);
|
|
|
+ re.sortGlj(me.showGljList);
|
|
|
+ //重新显示
|
|
|
+ me.showGljItems(me.showGljList, me.gljCurTypeId);
|
|
|
+ if (re.parentNodeIds["_pNodeId_" + me.gljCurTypeId]) {//更新cache
|
|
|
+ me.currentOprParent = 1;
|
|
|
+ me.currentCache = me.getParentCache(re.parentNodeIds["_pNodeId_" + me.gljCurTypeId]);
|
|
|
+ } else {
|
|
|
+ me.currentCache = me.getCache();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|