/** * 控制显示 */ private void controlEd() { SystemConfig.setOperate(checkTask); // 根据任务状态是否显示抽屉 if (checkStatue == null || TextUtils.isEmpty(checkStatue)) { if (gDrawer.getVisibility() == View.VISIBLE) { gDrawer.setVisibility(View.GONE); } TopManager.getInstance().getImbtnTongBu().setVisibility(View.GONE); } else if ("4".equals(checkStatue)) { if (gDrawer.getVisibility() == View.VISIBLE) { gDrawer.setVisibility(View.GONE); } TopManager.getInstance().getImbtnTongBu().setVisibility(View.GONE); } else if ("1".equals(checkStatue)) { if (gDrawer.getVisibility() == View.GONE) { gDrawer.setVisibility(View.VISIBLE); } // 任务已经受理才显示同步和提交按钮 if (checkTask != null && 1 == checkTask.getIsaccept()) { TopManager.getInstance().getImbtnTongBu().setVisibility(View.VISIBLE); } else { TopManager.getInstance().getImbtnTongBu().setVisibility(View.GONE); } } else if ("2".equals(checkStatue)) { if (gDrawer.getVisibility() == View.VISIBLE) { gDrawer.setVisibility(View.GONE); } TopManager.getInstance().getImbtnTongBu().setVisibility(View.VISIBLE); } else { if (gDrawer.getVisibility() == View.VISIBLE) { gDrawer.setVisibility(View.GONE); } TopManager.getInstance().getImbtnTongBu().setVisibility(View.GONE); } // 判断是否接受按钮 if (checkTask != null && 1 == checkTask.getIsaccept()) { SystemConfig.isOperate = true; drawerUtils.setAcceptBtn(false); } // 判断是否为改派申请 if (checkTask != null && "apply".equals(checkTask.getApplycannelstatus())) { drawerUtils.setGaiPaiBtn(false); SystemConfig.isOperate = false; } // 同步和撤销按钮控制 if ("synchroApply".equals(checkTask.getSynchrostatus())) { // 显示同步撤回按钮 isTongBuCancel = true; TopManager.getInstance().TongBuSurveryContinue(false); TopManager.getInstance().getImbtnTongBu().setEnabled(true); SystemConfig.isOperate = false; } else { TopManager.getInstance().TongBuSurveryContinue(true); TopManager.getInstance().getImbtnTongBu().setEnabled(true); isTongBuCancel = false; } }
@Override protected void init() { // 标识位不要动 SystemConfig.isDeflossPage = false; // 报案号和任务类型 if (bundle != null) { registNo = bundle.getString("registNo"); // 地区 String arean = registNo.substring(1, 3); if ("01".equals(arean)) { SystemConfig.AREAN = "北京"; } else if ("11".equals(arean)) { SystemConfig.AREAN = "北京"; } else if ("02".equals(arean)) { SystemConfig.AREAN = "上海"; } else { SystemConfig.AREAN = ""; } checkStatue = bundle.getString("checkStatue"); SystemConfig.PHOTO_CLAIMNO = registNo; checkTask = CheckTaskAccess.findByRegistno(registNo); } else { registNo = "报案号错误"; SystemConfig.PHOTO_CLAIMNO = "00000000"; checkTask = new CheckTask(); } // 加载布局文件 layout = inflater.inflate(R.layout.survey_basic, null); // 填充布局 LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT); layout.setLayoutParams(params); promptManager = new PromptManager(); // 初始化抽屉 gDrawer = layout.findViewById(R.id.survey_basic_drawer); drawerUtils = new DrawerUtils(gDrawer); dbHelper = new FastClaimDbHelper(context); // 获取报案号 commonUtils = new CommonUtils(); TopManager.getInstance().setHeadTitle(registNo, 16, Typeface.defaultFromStyle(Typeface.BOLD)); TopManager.getInstance() .getBtnSurveyBasicMsg() .setBackgroundResource(R.drawable.tasks_infortab_click); caseinfoRl = (RelativeLayout) layout.findViewById(R.id.survey_basic_btn_caseinfo); taskinfoRl = (RelativeLayout) layout.findViewById(R.id.survey_basic_btn_taskinfo); ACaseImv = (ImageView) layout.findViewById(R.id.survey_basic_caseinfo_ll); ATaskImg = (ImageView) layout.findViewById(R.id.survey_basic_taskinfo_ll); caseListView = (ListView) layout.findViewById(R.id.survey_basic_caseinfo_listview); taskListView = (ListView) layout.findViewById(R.id.survey_basic_taskinfo_listview); rlBaoDan = (RelativeLayout) layout.findViewById(R.id.survey_basic_btn_baodaninfo); rlHistory = (RelativeLayout) layout.findViewById(R.id.survey_basic_btn_history); rlOrderTime = (RelativeLayout) layout.findViewById(R.id.survey_basic_btn_predicttime); llOrderTime = (LinearLayout) layout.findViewById(R.id.survey_basic_ll_ordertime); imvOrderTime = (ImageView) layout.findViewById(R.id.survey_basic_taskinfo_ll_ordertime); messagesQuery = (RelativeLayout) layout.findViewById(R.id.survey_basic_btn_messagesQuery); messagesEditxiepei = (RelativeLayout) layout.findViewById(R.id.survey_basic_btn_messagesEditxiepei); edOrderTime = (EditText) layout.findViewById(R.id.survrybasic_taskinfo_listview_item_ed_ordertime); setDateTimeUsils = new SetDateTimeUsils(context); edOrderTime.setText(checkTask.getOrdertime()); contactRL = (RelativeLayout) layout.findViewById(R.id.survey_basic_btn_contactinfo); if (!SystemConfig.UserRightIsAdvanced) { contactRL.setVisibility(View.VISIBLE); contactImv = (ImageView) layout.findViewById(R.id.survey_basic_contactinfo_ll); contactListView = (ListView) layout.findViewById(R.id.survey_basic_contactinfo_listview); messagesEditxiepei.setVisibility(View.VISIBLE); // 联系人信息 if (sContactView == null) sContactView = new SContactView(context); } else { contactRL.setVisibility(View.GONE); messagesEditxiepei.setVisibility(View.GONE); } // 初始化数据 setData(); controlEd(); }