From 21e2a3fdce71cbaebd084e2e33f70cf32be4b5d4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E4=BF=8A=E4=BF=8A?= <857899254@qq.com>
Date: Tue, 15 Sep 2015 20:16:23 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E9=87=87=E8=B4=AD=E9=80=9A?=
 =?UTF-8?q?=E7=9F=A5=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../Controllers/SeePurchaseNoticeViewController.m  | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/XFFruit/ViewControllers/PurchaseNotice/Controllers/SeePurchaseNoticeViewController.m b/XFFruit/ViewControllers/PurchaseNotice/Controllers/SeePurchaseNoticeViewController.m
index 12b4bc4..9374df1 100644
--- a/XFFruit/ViewControllers/PurchaseNotice/Controllers/SeePurchaseNoticeViewController.m
+++ b/XFFruit/ViewControllers/PurchaseNotice/Controllers/SeePurchaseNoticeViewController.m
@@ -133,13 +133,21 @@ typedef enum : NSUInteger {
     [self.view addSubview:_endBtn];
     
     if ([self.purchaseNotice.state isEqualToString:PURCHASENOTICE_STATE_NOTACCEPTED]) {
-        if ([self checkIsPermission:NOTICE_PERMISSIONS_ACCEPTTASK]) {
+        if ([self checkIsPermission:NOTICE_PERMISSIONS_ACCEPTTASK] && [self checkIsPermission:NOTICE_PERMISSIONS_CREATEBILL]) {
             _rejectBtn.tag = AcceptTag;
             [_rejectBtn setTitle:@"接受任务" forState:UIControlStateNormal];
-        }
-        if ([self checkIsPermission:NOTICE_PERMISSIONS_CREATEBILL]) {
             _endBtn.tag = NewTag;
+            _endBtn.backgroundColor = [UIColor grayColor];
             [_endBtn setTitle:@"新建采购单" forState:UIControlStateNormal];
+        }else{
+            if ([self checkIsPermission:NOTICE_PERMISSIONS_ACCEPTTASK]) {
+                _rejectBtn.tag = AcceptTag;
+                [_rejectBtn setTitle:@"接受任务" forState:UIControlStateNormal];
+            }
+            if ([self checkIsPermission:NOTICE_PERMISSIONS_CREATEBILL]) {
+                _endBtn.tag = NewTag;
+                [_endBtn setTitle:@"新建采购单" forState:UIControlStateNormal];
+            }
         }
     }else if([self.purchaseNotice.state isEqualToString:PURCHASENOTICE_STATE_PURCHASEING]){
         if([self checkIsPermission:NOTICE_PERMISSIONS_FINISH]){
-- 
2.18.1