Commit 520c7985 authored by freecui's avatar freecui

更改重复的功能按钮

parent a64cbdf8
......@@ -255,45 +255,6 @@
[muArr removeObject:displayFunction];
hasSeeOption1 = NO;
}
continue;
}
}
return muArr;
}
//把显示重复功能的去掉
- (NSArray *)siftDuplicationDisplayFunctionsButton {
NSMutableArray *allDisplayFunctionsArr = [NSMutableArray arrayWithArray:[self displayFunctionsHasPermission]];
NSMutableArray *muArr = [NSMutableArray array];
NSArray *hasPermission = [self p_functionsIdPermission];
BOOL hasSeeOption1 = NO;
BOOL hasSeeOption3 = NO;
BOOL hasSeeOption4 = NO;
BOOL hasSeeOption5 = NO;
BOOL hasSeeOption6 = NO;
BOOL hasSeeOption7 = NO;
for (int count = 0; count < hasPermission.count; count ++) {
FMResultSet *rs = [_dataBase executeQuery: @"SELECT * FROM displayFunction WHERE functionId = ?",hasPermission[count] ];
while ([rs next]) {
GXFDisplayFunction *displayFunction = [self p_resultSetDisplayFunction:rs];
[muArr addObject:displayFunction];
//"行情反馈",
if (displayFunction.functionId == 500102 && hasSeeOption1 == NO) {
hasSeeOption1 = YES;
}
if (displayFunction.functionId == 500103 && hasSeeOption1 == YES) {
[muArr removeObject:displayFunction];
hasSeeOption1 = NO;
}
//"采购通知"
if (displayFunction.functionId == 500302 && hasSeeOption3 == NO) {
hasSeeOption3 = YES;
......@@ -311,18 +272,6 @@
[muArr removeObject:displayFunction];
hasSeeOption4 = YES;
}
// if (displayFunction.functionId == 500403 && hasSeeOption4 == NO) {
// //[muArr removeObject:displayFunction];
// hasSeeOption4 = YES;
// }
// if (displayFunction.functionId == 500403 && hasSeeOption4 == YES) {
// [muArr removeObject:displayFunction];
// hasSeeOption4 = YES;
// }
// if (displayFunction.functionId == 500404 && hasSeeOption4 == YES) {
// [muArr removeObject:displayFunction];
// hasSeeOption4 = YES;
// }
//"发运单"
if (displayFunction.functionId == 500502 && hasSeeOption5 == NO) {
......@@ -350,12 +299,107 @@
hasSeeOption7 = NO;
}
continue;
}
}
return muArr;
}
////把显示重复功能的去掉
//- (NSArray *)siftDuplicationDisplayFunctionsButton {
// NSMutableArray *allDisplayFunctionsArr = [NSMutableArray arrayWithArray:[self displayFunctionsHasPermission]];
// NSMutableArray *muArr = [NSMutableArray array];
//
// NSArray *hasPermission = [self p_functionsIdPermission];
// BOOL hasSeeOption1 = NO;
//
// BOOL hasSeeOption3 = NO;
// BOOL hasSeeOption4 = NO;
// BOOL hasSeeOption5 = NO;
// BOOL hasSeeOption6 = NO;
// BOOL hasSeeOption7 = NO;
//
// for (int count = 0; count < hasPermission.count; count ++) {
// FMResultSet *rs = [_dataBase executeQuery: @"SELECT * FROM displayFunction WHERE functionId = ?",hasPermission[count] ];
// while ([rs next]) {
// GXFDisplayFunction *displayFunction = [self p_resultSetDisplayFunction:rs];
//
// [muArr addObject:displayFunction];
// //"行情反馈",
// if (displayFunction.functionId == 500102 && hasSeeOption1 == NO) {
// hasSeeOption1 = YES;
// }
// if (displayFunction.functionId == 500103 && hasSeeOption1 == YES) {
// [muArr removeObject:displayFunction];
// hasSeeOption1 = NO;
// }
//
// //"采购通知"
// if (displayFunction.functionId == 500302 && hasSeeOption3 == NO) {
// hasSeeOption3 = YES;
// }
// if (displayFunction.functionId == 500303 && hasSeeOption3 == YES) {
// [muArr removeObject:displayFunction];
// hasSeeOption3 = NO;
// }
//
// //采购单???? 有三个:"全部查看权"、"本人查看权"、 "供应商查看权"
// if (displayFunction.functionId == 500402 && hasSeeOption4 == NO) {
// hasSeeOption4 = YES;
// }
// if (displayFunction.functionId == 500403 && hasSeeOption4 == YES) {
// [muArr removeObject:displayFunction];
// hasSeeOption4 = YES;
// }
//// if (displayFunction.functionId == 500403 && hasSeeOption4 == NO) {
//// //[muArr removeObject:displayFunction];
//// hasSeeOption4 = YES;
//// }
//// if (displayFunction.functionId == 500403 && hasSeeOption4 == YES) {
//// [muArr removeObject:displayFunction];
//// hasSeeOption4 = YES;
//// }
//// if (displayFunction.functionId == 500404 && hasSeeOption4 == YES) {
//// [muArr removeObject:displayFunction];
//// hasSeeOption4 = YES;
//// }
//
// //"发运单"
// if (displayFunction.functionId == 500502 && hasSeeOption5 == NO) {
// hasSeeOption5 = YES;
// }
// if (displayFunction.functionId == 500503 && hasSeeOption5 == YES) {
// [muArr removeObject:displayFunction];
// hasSeeOption5 = NO;
// }
//
// //"转运单"
// if (displayFunction.functionId == 500602 && hasSeeOption6 == NO) {
// hasSeeOption6 = YES;
// }
// if (displayFunction.functionId == 500603 && hasSeeOption6 == YES) {
// [muArr removeObject:displayFunction];
// hasSeeOption6 = NO;
// }
// //"加工单"
// if (displayFunction.functionId == 500702 && hasSeeOption7 == NO) {
// hasSeeOption7 = YES;
// }
// if (displayFunction.functionId == 500703 && hasSeeOption7 == YES) {
// [muArr removeObject:displayFunction];
// hasSeeOption7 = NO;
// }
//
// }
// }
//
// return muArr;
//
//}
//默认配置显示功能 初始配置为
- (NSArray *)defaultdisplayFunctions {
NSMutableArray *arr = [NSMutableArray arrayWithArray:[self displayFunctionsHasPermission]];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment