Commit fc94e363 by onuma

作業報告(追加・変更)画面では、IO帳票アイコンを非表示にした。処理追加

parent 833c99f1
...@@ -76,7 +76,6 @@ import jp.agentec.abook.abv.ui.viewer.view.CheckFormXWalkWebview; ...@@ -76,7 +76,6 @@ import jp.agentec.abook.abv.ui.viewer.view.CheckFormXWalkWebview;
public class HTMLWebViewActivity extends ParentWebViewActivity { public class HTMLWebViewActivity extends ParentWebViewActivity {
private static final String TAG = "HTMLWebViewActivity"; private static final String TAG = "HTMLWebViewActivity";
private OperationDao mOperationDao = AbstractDao.getDao(OperationDao.class);
/** /**
* Called when the activity is first created. * Called when the activity is first created.
...@@ -380,6 +379,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -380,6 +379,7 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
} }
}); });
// 簡易帳票印刷ボタン
printButton.setOnClickListener(new View.OnClickListener() { printButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
...@@ -387,8 +387,6 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -387,8 +387,6 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
showPrintTargetSelect(); showPrintTargetSelect();
} }
}); });
// 簡易帳票印刷ボタン表示・非表示設定
printButtonActivityControl();
downloadButton = (ImageButton) findViewById(R.id.btn_download); downloadButton = (ImageButton) findViewById(R.id.btn_download);
downloadButton.setOnClickListener(new View.OnClickListener() { downloadButton.setOnClickListener(new View.OnClickListener() {
...@@ -735,20 +733,6 @@ public class HTMLWebViewActivity extends ParentWebViewActivity { ...@@ -735,20 +733,6 @@ public class HTMLWebViewActivity extends ParentWebViewActivity {
mUploadMessage = null; mUploadMessage = null;
} }
/**
* 簡易帳票印刷ボタン活性制御
* 簡易帳票区分が1のデータが存在する場合表示、それ以外非表示
* これとは別に、ヘルプボタンが非表示になる時に必ず非表示になる。
*/
private void printButtonActivityControl() {
OperationDto operation = mOperationDao.getOperation(mOperationId);
if (operation != null && operation.quickReport == 1 && ABVDataCache.getInstance().serviceOption.isUnableIOReport()) {
printButton.setVisibility(View.VISIBLE);
} else {
printButton.setVisibility(View.GONE);
}
}
// 簡易帳票印刷対象選択画面表示 // 簡易帳票印刷対象選択画面表示
private void showPrintTargetSelect() { private void showPrintTargetSelect() {
if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) { if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
......
...@@ -24,9 +24,12 @@ import jp.agentec.abook.abv.bl.common.CommonExecutor; ...@@ -24,9 +24,12 @@ import jp.agentec.abook.abv.bl.common.CommonExecutor;
import jp.agentec.abook.abv.bl.common.Constant; import jp.agentec.abook.abv.bl.common.Constant;
import jp.agentec.abook.abv.bl.common.constant.ABookKeys; import jp.agentec.abook.abv.bl.common.constant.ABookKeys;
import jp.agentec.abook.abv.bl.common.log.Logger; import jp.agentec.abook.abv.bl.common.log.Logger;
import jp.agentec.abook.abv.bl.data.ABVDataCache;
import jp.agentec.abook.abv.bl.data.dao.AbstractDao; import jp.agentec.abook.abv.bl.data.dao.AbstractDao;
import jp.agentec.abook.abv.bl.data.dao.ContentDao; import jp.agentec.abook.abv.bl.data.dao.ContentDao;
import jp.agentec.abook.abv.bl.data.dao.OperationDao;
import jp.agentec.abook.abv.bl.dto.ContentDto; import jp.agentec.abook.abv.bl.dto.ContentDto;
import jp.agentec.abook.abv.bl.dto.OperationDto;
import jp.agentec.abook.abv.bl.logic.AbstractLogic; import jp.agentec.abook.abv.bl.logic.AbstractLogic;
import jp.agentec.abook.abv.bl.logic.ContentObjectLogLogic; import jp.agentec.abook.abv.bl.logic.ContentObjectLogLogic;
import jp.agentec.abook.abv.bl.logic.OperationLogic; import jp.agentec.abook.abv.bl.logic.OperationLogic;
...@@ -130,16 +133,30 @@ public class ParentWebViewActivity extends ABVCheckContentViewActivity { ...@@ -130,16 +133,30 @@ public class ParentWebViewActivity extends ABVCheckContentViewActivity {
setVisbilityProgress(false); setVisbilityProgress(false);
} }
} }
private OperationDao mOperationDao = AbstractDao.getDao(OperationDao.class);
/**
* 簡易帳票印刷ボタン活性制御
* 簡易帳票区分が1のデータが存在する場合表示、それ以外非表示
*/
private void printButtonActivityControl() {
OperationDto operation = mOperationDao.getOperation(mOperationId);
if (operation != null && operation.quickReport == 1 && ABVDataCache.getInstance().serviceOption.isUnableIOReport()) {
printButton.setVisibility(View.VISIBLE);
} else {
printButton.setVisibility(View.GONE);
}
}
@Override @Override
protected void commonConfigureHeader() { protected void commonConfigureHeader() {
if (mStatusCode == Constant.XWalkWebViewDisplayStatus.InitView) { //フォームが非表示時のみヘルプボタン表示 if (mStatusCode == Constant.XWalkWebViewDisplayStatus.InitView) {
helpButton.setVisibility(View.VISIBLE); helpButton.setVisibility(View.VISIBLE);
printButton.setVisibility(View.VISIBLE); printButtonActivityControl();
} else { } else {
// ヘルプボタンを表示しない時、IO帳票ボタンも表示しない。
helpButton.setVisibility(View.INVISIBLE); helpButton.setVisibility(View.INVISIBLE);
printButton.setVisibility(View.INVISIBLE); // ヘルプボタンを表示しない時、IO帳票ボタンも表示しない。 printButton.setVisibility(View.INVISIBLE);
} }
if (Constant.XWalkWebViewDisplayStatus.TaskView == mStatusCode) { if (Constant.XWalkWebViewDisplayStatus.TaskView == mStatusCode) {
...@@ -170,6 +187,7 @@ public class ParentWebViewActivity extends ABVCheckContentViewActivity { ...@@ -170,6 +187,7 @@ public class ParentWebViewActivity extends ABVCheckContentViewActivity {
if (mXWalkOpenType == Constant.XWalkOpenType.DEFAULT) { if (mXWalkOpenType == Constant.XWalkOpenType.DEFAULT) {
helpButton.setVisibility(View.GONE); helpButton.setVisibility(View.GONE);
printButton.setVisibility(View.GONE);
operationHomeButton.setVisibility(View.GONE); operationHomeButton.setVisibility(View.GONE);
addSceneButton.setVisibility(View.GONE); addSceneButton.setVisibility(View.GONE);
taskListButton.setVisibility(View.GONE); taskListButton.setVisibility(View.GONE);
...@@ -179,6 +197,7 @@ public class ParentWebViewActivity extends ABVCheckContentViewActivity { ...@@ -179,6 +197,7 @@ public class ParentWebViewActivity extends ABVCheckContentViewActivity {
helpButton.setVisibility(View.INVISIBLE); helpButton.setVisibility(View.INVISIBLE);
} else { } else {
helpButton.setVisibility(View.VISIBLE); helpButton.setVisibility(View.VISIBLE);
printButtonActivityControl();
} }
operationHomeButton.setVisibility(View.VISIBLE); operationHomeButton.setVisibility(View.VISIBLE);
......
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