|
@@ -1,12 +1,15 @@
|
|
|
package com.uas.uas_mes_zb_p.fragment;
|
|
package com.uas.uas_mes_zb_p.fragment;
|
|
|
|
|
|
|
|
import android.app.Activity;
|
|
import android.app.Activity;
|
|
|
|
|
+import android.app.AlertDialog;
|
|
|
import android.content.Context;
|
|
import android.content.Context;
|
|
|
|
|
+import android.content.DialogInterface;
|
|
|
import android.content.Intent;
|
|
import android.content.Intent;
|
|
|
import android.graphics.Color;
|
|
import android.graphics.Color;
|
|
|
import android.graphics.drawable.BitmapDrawable;
|
|
import android.graphics.drawable.BitmapDrawable;
|
|
|
import android.os.Bundle;
|
|
import android.os.Bundle;
|
|
|
import android.support.v4.content.ContextCompat;
|
|
import android.support.v4.content.ContextCompat;
|
|
|
|
|
+import android.util.Log;
|
|
|
import android.view.Gravity;
|
|
import android.view.Gravity;
|
|
|
import android.view.KeyEvent;
|
|
import android.view.KeyEvent;
|
|
|
import android.view.LayoutInflater;
|
|
import android.view.LayoutInflater;
|
|
@@ -100,6 +103,16 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
private String bar_remain;
|
|
private String bar_remain;
|
|
|
private String pi_status;
|
|
private String pi_status;
|
|
|
private InputMethodManager imm;
|
|
private InputMethodManager imm;
|
|
|
|
|
+ private boolean ischeck=false;
|
|
|
|
|
+ private Double pd_barcodeqtyDouble;
|
|
|
|
|
+ private Double pd_outqtyDouble;
|
|
|
|
|
+ private Double numberDouble;
|
|
|
|
|
+ private Integer integer;
|
|
|
|
|
+ private String pi_classs;
|
|
|
|
|
+ private PopupWindow mMenuPopupWindow;
|
|
|
|
|
+ private ImageView mMoreButton;
|
|
|
|
|
+ private View mMenuView;
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
protected int getLayout() {
|
|
protected int getLayout() {
|
|
|
return R.layout.fragment_outboundlistadd;
|
|
return R.layout.fragment_outboundlistadd;
|
|
@@ -108,6 +121,8 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
@Override
|
|
@Override
|
|
|
protected void initViews() {
|
|
protected void initViews() {
|
|
|
FunctionActivity.setTitle(getString(R.string.title_outbound_rechargeadd));
|
|
FunctionActivity.setTitle(getString(R.string.title_outbound_rechargeadd));
|
|
|
|
|
+ ((FunctionActivity) getActivity()).setListIconIvVisible(true);
|
|
|
|
|
+ mMoreButton = (ImageView) getActivity().findViewById(R.id.btn_actionbar_list_icon_iv);
|
|
|
storage_recharge_collect_ets = mActivity.findViewById(R.id.storage_recharge_collect_ets);
|
|
storage_recharge_collect_ets = mActivity.findViewById(R.id.storage_recharge_collect_ets);
|
|
|
storage_recharge_scan_ivs = mActivity.findViewById(R.id.storage_recharge_scan_ivs);
|
|
storage_recharge_scan_ivs = mActivity.findViewById(R.id.storage_recharge_scan_ivs);
|
|
|
tv_documents_code = mActivity.findViewById(R.id.tv_documents_code);
|
|
tv_documents_code = mActivity.findViewById(R.id.tv_documents_code);
|
|
@@ -150,6 +165,7 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
jlt_storage_in_audit_btn.setOnClickListener(this);
|
|
jlt_storage_in_audit_btn.setOnClickListener(this);
|
|
|
jlt_outbound_in_post_btn.setOnClickListener(this);
|
|
jlt_outbound_in_post_btn.setOnClickListener(this);
|
|
|
outbound_search_im.setOnClickListener(this);
|
|
outbound_search_im.setOnClickListener(this);
|
|
|
|
|
+ mMoreButton.setOnClickListener(this);
|
|
|
storage_recharge_collect_ets.requestFocus();
|
|
storage_recharge_collect_ets.requestFocus();
|
|
|
storage_recharge_collect_ets.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
|
storage_recharge_collect_ets.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
|
|
@Override
|
|
@Override
|
|
@@ -161,7 +177,7 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
SharedPreUtil.saveString(mActivity,"out_editorcodes",data);
|
|
SharedPreUtil.saveString(mActivity,"out_editorcodes",data);
|
|
|
|
|
|
|
|
if (add_checkbos.isChecked()==true){
|
|
if (add_checkbos.isChecked()==true){
|
|
|
- getDialogDatalistCodes(data,"");
|
|
|
|
|
|
|
+ baoucn(data,"");
|
|
|
storage_recharge_collect_ets.selectAll();
|
|
storage_recharge_collect_ets.selectAll();
|
|
|
storage_recharge_collect_ets.requestFocus();
|
|
storage_recharge_collect_ets.requestFocus();
|
|
|
imm.showSoftInput(storage_recharge_collect_ets, InputMethodManager.RESULT_HIDDEN);
|
|
imm.showSoftInput(storage_recharge_collect_ets, InputMethodManager.RESULT_HIDDEN);
|
|
@@ -212,7 +228,6 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
va_detailColumn.setOnColumnItemClickListener(this);
|
|
va_detailColumn.setOnColumnItemClickListener(this);
|
|
|
va_codeColumn.setOnColumnItemClickListener(this);
|
|
va_codeColumn.setOnColumnItemClickListener(this);
|
|
|
|
|
|
|
|
-
|
|
|
|
|
// ceshiData();
|
|
// ceshiData();
|
|
|
}
|
|
}
|
|
|
@Override
|
|
@Override
|
|
@@ -233,8 +248,14 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
.setContentCellBackgroundFormat(new BaseCellBackgroundFormat<CellInfo>() {
|
|
.setContentCellBackgroundFormat(new BaseCellBackgroundFormat<CellInfo>() {
|
|
|
@Override
|
|
@Override
|
|
|
public int getBackGroundColor(CellInfo cellInfo) {
|
|
public int getBackGroundColor(CellInfo cellInfo) {
|
|
|
- if (cellInfo.row % 2 == 0) {
|
|
|
|
|
- return ContextCompat.getColor(mActivity, R.color.white);
|
|
|
|
|
|
|
+// for (int i=0;i<mFilterStorageInBeans.size();i++){
|
|
|
|
|
+// }
|
|
|
|
|
+ String pd_pdno = mFilterStorageInBeans.get(0).getPD_PDNO();
|
|
|
|
|
+ SharedPreUtil.saveString(mActivity,"positionid",0+"");
|
|
|
|
|
+ SharedPreUtil.saveString(mActivity,"pd_pdnoid",pd_pdno+"");
|
|
|
|
|
+ if (cellInfo.row == 0) {
|
|
|
|
|
+ return ContextCompat.getColor(mActivity, R.color.text_blue);
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
return TableConfig.INVALID_COLOR;
|
|
return TableConfig.INVALID_COLOR;
|
|
|
}
|
|
}
|
|
@@ -248,7 +269,7 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
String pi_inoutno = bundle.getString("pi_inoutno");
|
|
String pi_inoutno = bundle.getString("pi_inoutno");
|
|
|
String pi_statuscode = bundle.getString("pi_statuscode");
|
|
String pi_statuscode = bundle.getString("pi_statuscode");
|
|
|
String pi_invostatuscode = bundle.getString("pi_invostatuscode");
|
|
String pi_invostatuscode = bundle.getString("pi_invostatuscode");
|
|
|
-
|
|
|
|
|
|
|
+ pi_classs = bundle.getString("pi_class");
|
|
|
if (pi_statuscode.equals("POSTED")){//已过账
|
|
if (pi_statuscode.equals("POSTED")){//已过账
|
|
|
jlt_storage_in_generate_detailed_btn.setEnabled(false);//明细
|
|
jlt_storage_in_generate_detailed_btn.setEnabled(false);//明细
|
|
|
jlt_storage_in_barcode_save_btn.setEnabled(false);//提交
|
|
jlt_storage_in_barcode_save_btn.setEnabled(false);//提交
|
|
@@ -366,6 +387,41 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
* 弹框保存按钮
|
|
* 弹框保存按钮
|
|
|
*/
|
|
*/
|
|
|
private void getDialogDatalistCodes(String data,String number) {
|
|
private void getDialogDatalistCodes(String data,String number) {
|
|
|
|
|
+ String pd_pdnoid = SharedPreUtil.getString(mActivity, "positionid", null);
|
|
|
|
|
+
|
|
|
|
|
+ if (!StringUtil.isEmpty(pd_pdnoid)){
|
|
|
|
|
+ integer = Integer.valueOf(pd_pdnoid);
|
|
|
|
|
+ String pd_barcodeqty = mFilterStorageInBeans.get(integer).getPD_BARCODEQTY();//条码数量
|
|
|
|
|
+ String pd_outqty = mFilterStorageInBeans.get(integer).getPD_OUTQTY();//数量
|
|
|
|
|
+ if (pd_barcodeqty.isEmpty()){
|
|
|
|
|
+ pd_barcodeqtyDouble=0.0;
|
|
|
|
|
+ }else {
|
|
|
|
|
+ pd_barcodeqtyDouble = Double.valueOf(pd_barcodeqty);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (pd_outqty.isEmpty()){
|
|
|
|
|
+ pd_outqtyDouble=0.0;
|
|
|
|
|
+ }else {
|
|
|
|
|
+ pd_outqtyDouble = Double.valueOf(pd_outqty);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (number.isEmpty()){
|
|
|
|
|
+ numberDouble = 0.0;
|
|
|
|
|
+ }else {
|
|
|
|
|
+ numberDouble = Double.valueOf(number);
|
|
|
|
|
+ }
|
|
|
|
|
+ Log.e("pd_barcodeqtyDouble", pd_barcodeqtyDouble +"");
|
|
|
|
|
+ Log.e("pd_outqtyDouble", pd_outqtyDouble +"");
|
|
|
|
|
+ Log.e("numberDouble", numberDouble +"");
|
|
|
|
|
+ double v = pd_barcodeqtyDouble + numberDouble;
|
|
|
|
|
+ Log.e("v",v+"");
|
|
|
|
|
+ if (pd_barcodeqtyDouble > pd_outqtyDouble||pd_barcodeqtyDouble + numberDouble > pd_outqtyDouble){
|
|
|
|
|
+ dialosDatas(data,number,v, pd_outqtyDouble);
|
|
|
|
|
+ }else {
|
|
|
|
|
+ baoucn(data,number);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ //保存
|
|
|
|
|
+ public void baoucn(String data,String number){
|
|
|
String positionid = SharedPreUtil.getString(mActivity, "pd_pdnoid", null);
|
|
String positionid = SharedPreUtil.getString(mActivity, "pd_pdnoid", null);
|
|
|
progressDialog.show();
|
|
progressDialog.show();
|
|
|
String out_editorcodes = SharedPreUtil.getString(mActivity, "out_editorcodes", null);
|
|
String out_editorcodes = SharedPreUtil.getString(mActivity, "out_editorcodes", null);
|
|
@@ -451,6 +507,60 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 拆分单据
|
|
|
|
|
+ */
|
|
|
|
|
+ public void resolutionData(){
|
|
|
|
|
+ String piacalass = null;
|
|
|
|
|
+ progressDialog.show();
|
|
|
|
|
+
|
|
|
|
|
+ String string_va_id = SharedPreUtil.getString(mActivity, Constants.STORAGEERECHADD, null);
|
|
|
|
|
+ if (!StringUtil.isEmpty(va_ids)){
|
|
|
|
|
+ string_va_id=va_ids;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (pi_classs.equals("拨出单")){
|
|
|
|
|
+ piacalass="ProdInOut!AppropriationOut";
|
|
|
|
|
+ }
|
|
|
|
|
+ if (pi_classs.equals("生产领料单")){
|
|
|
|
|
+ piacalass="ProdInOut!Picking";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
|
|
|
|
|
+ .url(GloableParams.ADDRESS_ADDRESSTAIL_RESOLUTION)
|
|
|
|
|
+ .method(Request.Method.GET)
|
|
|
|
|
+ .tag(TAG + "getindatalist")
|
|
|
|
|
+ .flag(0)
|
|
|
|
|
+ .addParam("id", string_va_id)
|
|
|
|
|
+ .addParam("caller", piacalass)
|
|
|
|
|
+ .addParam("cls",pi_classs)
|
|
|
|
|
+ .build(), new HttpCallback() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onSuccess(int flag, Object o) throws Exception {
|
|
|
|
|
+ progressDialog.dismiss();
|
|
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "拆分成功");
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onFail(int flag, String failStr) throws Exception {
|
|
|
|
|
+ progressDialog.dismiss();
|
|
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, failStr);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ public void dialosDatas(String data,String number,Double v,Double pd_outqtyDouble){
|
|
|
|
|
+ new AlertDialog.Builder(getActivity()).setTitle("提示").setMessage("本次条码数量:"+v+"大于出库数量:"+pd_outqtyDouble)
|
|
|
|
|
+ .setPositiveButton(getString(R.string.confirm), new DialogInterface.OnClickListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onClick(DialogInterface dialog, int which) {
|
|
|
|
|
+ baoucn(data,number);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ }).setNegativeButton(getString(R.string.cancel), null).create().show();
|
|
|
|
|
+ }
|
|
|
private void commitDataCodes(){//提交
|
|
private void commitDataCodes(){//提交
|
|
|
progressDialog.show();
|
|
progressDialog.show();
|
|
|
|
|
|
|
@@ -486,6 +596,7 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+ getDataCommitList();
|
|
|
}
|
|
}
|
|
|
//生成明细数据
|
|
//生成明细数据
|
|
|
private void getDataadCommitList(){
|
|
private void getDataadCommitList(){
|
|
@@ -529,8 +640,6 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
.flag(0)
|
|
.flag(0)
|
|
|
.addParam("pi_id",string_va_ids)
|
|
.addParam("pi_id",string_va_ids)
|
|
|
.build(), new HttpCallback() {
|
|
.build(), new HttpCallback() {
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
private String pi_statuscode;
|
|
private String pi_statuscode;
|
|
|
private String pi_invostatuscode;
|
|
private String pi_invostatuscode;
|
|
|
|
|
|
|
@@ -692,6 +801,7 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+ getDataCommitList();
|
|
|
}
|
|
}
|
|
|
private void genePostingData(){//过账
|
|
private void genePostingData(){//过账
|
|
|
progressDialog.show();
|
|
progressDialog.show();
|
|
@@ -722,8 +832,12 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+ getDataCommitList();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
//弹窗
|
|
//弹窗
|
|
|
private void initEditPopupWindow() {
|
|
private void initEditPopupWindow() {
|
|
|
View contView = LayoutInflater.from(mActivity).inflate(R.layout.index_edit_pup, null);
|
|
View contView = LayoutInflater.from(mActivity).inflate(R.layout.index_edit_pup, null);
|
|
@@ -795,7 +909,47 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
}, 100);
|
|
}, 100);
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ private void showMoreMenu() {
|
|
|
|
|
+ if (mMenuView == null) {
|
|
|
|
|
+ mMenuView = View.inflate(mActivity, R.layout.pop_outboundlist_out_menu2, null);
|
|
|
|
|
+ }
|
|
|
|
|
+ Button pop_material_out_resolution = (Button) mMenuView.findViewById(R.id.pop_material_out_resolution);
|
|
|
|
|
+ pop_material_out_resolution.setOnClickListener(new View.OnClickListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onClick(View v) {
|
|
|
|
|
+ new AlertDialog.Builder(getActivity()).setTitle("提示").setMessage("确认拆分单据?")
|
|
|
|
|
+ .setPositiveButton(getString(R.string.confirm), new DialogInterface.OnClickListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onClick(DialogInterface dialog, int which) {
|
|
|
|
|
+ resolutionData();
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ }).setNegativeButton(getString(R.string.cancel), null).create().show();
|
|
|
|
|
+ closeMenuPopupWindow();
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+ if (mMenuPopupWindow == null) {
|
|
|
|
|
+ mMenuPopupWindow = new PopupWindow(mMenuView, LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT, true);
|
|
|
|
|
+ }
|
|
|
|
|
+ mMenuPopupWindow.setBackgroundDrawable(new BitmapDrawable());
|
|
|
|
|
+ mMenuPopupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onDismiss() {
|
|
|
|
|
+ closeMenuPopupWindow();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ CommonUtil.setBackgroundAlpha(mActivity, 0.5f);
|
|
|
|
|
+ mMenuPopupWindow.showAsDropDown(mMoreButton);
|
|
|
|
|
+ }
|
|
|
|
|
+ private void closeMenuPopupWindow() {
|
|
|
|
|
+ if (mMenuPopupWindow != null) {
|
|
|
|
|
+ mMenuPopupWindow.dismiss();
|
|
|
|
|
+ mMenuPopupWindow = null;
|
|
|
|
|
+ CommonUtil.setBackgroundAlpha(mActivity, 1f);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
private void closeListPopupWindow() {
|
|
private void closeListPopupWindow() {
|
|
|
if (editPW != null) {
|
|
if (editPW != null) {
|
|
|
editPW.dismiss();
|
|
editPW.dismiss();
|
|
@@ -811,6 +965,7 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
EventBus.getDefault().post(new MessageOutboundEvents("提交单据后刷新列表"));
|
|
EventBus.getDefault().post(new MessageOutboundEvents("提交单据后刷新列表"));
|
|
|
SharedPreUtil.removeString(mActivity,"positionid");
|
|
SharedPreUtil.removeString(mActivity,"positionid");
|
|
|
SharedPreUtil.removeString(mActivity,"pd_pdnoid");
|
|
SharedPreUtil.removeString(mActivity,"pd_pdnoid");
|
|
|
|
|
+
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -825,6 +980,9 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
@Override
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
public void onClick(View v) {
|
|
|
switch (v.getId()) {
|
|
switch (v.getId()) {
|
|
|
|
|
+ case R.id.btn_actionbar_list_icon_iv:
|
|
|
|
|
+ showMoreMenu();
|
|
|
|
|
+ break;
|
|
|
case R.id.storage_recharge_scan_ivs:
|
|
case R.id.storage_recharge_scan_ivs:
|
|
|
if (CameraUtil.hasCamera()) {
|
|
if (CameraUtil.hasCamera()) {
|
|
|
if (root.findFocus() != null) {
|
|
if (root.findFocus() != null) {
|
|
@@ -861,29 +1019,44 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private boolean ischeck=false;
|
|
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public void onClick (Column < String > column, String value, String s,int position){
|
|
public void onClick (Column < String > column, String value, String s,int position){
|
|
|
|
|
+// String pd_outqty = mFilterStorageInBeans.get(position).getPD_OUTQTY();//数量
|
|
|
|
|
+// String pd_barcodeqty = mFilterStorageInBeans.get(position).getPD_BARCODEQTY();//条码数量
|
|
|
|
|
+// if (Integer.valueOf(pd_outqty)>Integer.valueOf(pd_barcodeqty)){
|
|
|
|
|
+// mSmartTable.getConfig()
|
|
|
|
|
+// .setContentCellBackgroundFormat(new BaseCellBackgroundFormat<CellInfo>() {
|
|
|
|
|
+// @Override
|
|
|
|
|
+// public int getBackGroundColor(CellInfo cellInfo) {
|
|
|
|
|
+// if (cellInfo.row == position) {
|
|
|
|
|
+// return ContextCompat.getColor(mActivity, R.color.search_gray);
|
|
|
|
|
+// }
|
|
|
|
|
+// return TableConfig.INVALID_COLOR;
|
|
|
|
|
+// }
|
|
|
|
|
+// });
|
|
|
|
|
+// }
|
|
|
|
|
+
|
|
|
String pd_pdno = mFilterStorageInBeans.get(position).getPD_PDNO();
|
|
String pd_pdno = mFilterStorageInBeans.get(position).getPD_PDNO();
|
|
|
- String positionid = SharedPreUtil.getString(mActivity, "positionid", null);
|
|
|
|
|
- if (!StringUtil.isEmpty(positionid) && positionid.equals(position+"")){
|
|
|
|
|
- SharedPreUtil.removeString(mActivity,"positionid");
|
|
|
|
|
- SharedPreUtil.removeString(mActivity,"pd_pdnoid");
|
|
|
|
|
- mSmartTable.getConfig()
|
|
|
|
|
- .setContentCellBackgroundFormat(new BaseCellBackgroundFormat<CellInfo>() {
|
|
|
|
|
- @Override
|
|
|
|
|
- public int getBackGroundColor(CellInfo cellInfo) {
|
|
|
|
|
- int row = cellInfo.row;
|
|
|
|
|
- if (cellInfo.row == position) {
|
|
|
|
|
- ischeck=false;
|
|
|
|
|
- if (ischeck==false){
|
|
|
|
|
- return ContextCompat.getColor(mActivity, R.color.white);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- return TableConfig.INVALID_COLOR;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }else {
|
|
|
|
|
|
|
+// String positionid = SharedPreUtil.getString(mActivity, "positionid", null);
|
|
|
|
|
+// if (!StringUtil.isEmpty(positionid) && positionid.equals(position+"")){
|
|
|
|
|
+// SharedPreUtil.removeString(mActivity,"positionid");
|
|
|
|
|
+// SharedPreUtil.removeString(mActivity,"pd_pdnoid");
|
|
|
|
|
+// mSmartTable.getConfig()
|
|
|
|
|
+// .setContentCellBackgroundFormat(new BaseCellBackgroundFormat<CellInfo>() {
|
|
|
|
|
+// @Override
|
|
|
|
|
+// public int getBackGroundColor(CellInfo cellInfo) {
|
|
|
|
|
+// int row = cellInfo.row;
|
|
|
|
|
+// if (cellInfo.row == position) {
|
|
|
|
|
+// ischeck=false;
|
|
|
|
|
+// if (ischeck==false){
|
|
|
|
|
+// return ContextCompat.getColor(mActivity, R.color.white);
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// return TableConfig.INVALID_COLOR;
|
|
|
|
|
+// }
|
|
|
|
|
+// });
|
|
|
|
|
+// }else {
|
|
|
SharedPreUtil.saveString(mActivity,"positionid",position+"");
|
|
SharedPreUtil.saveString(mActivity,"positionid",position+"");
|
|
|
SharedPreUtil.saveString(mActivity,"pd_pdnoid",pd_pdno+"");
|
|
SharedPreUtil.saveString(mActivity,"pd_pdnoid",pd_pdno+"");
|
|
|
|
|
|
|
@@ -891,18 +1064,17 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
.setContentCellBackgroundFormat(new BaseCellBackgroundFormat<CellInfo>() {
|
|
.setContentCellBackgroundFormat(new BaseCellBackgroundFormat<CellInfo>() {
|
|
|
@Override
|
|
@Override
|
|
|
public int getBackGroundColor(CellInfo cellInfo) {
|
|
public int getBackGroundColor(CellInfo cellInfo) {
|
|
|
- int row = cellInfo.row;
|
|
|
|
|
if (cellInfo.row == position) {
|
|
if (cellInfo.row == position) {
|
|
|
ischeck=false;
|
|
ischeck=false;
|
|
|
if (ischeck==false){
|
|
if (ischeck==false){
|
|
|
- return ContextCompat.getColor(mActivity, R.color.search_gray);
|
|
|
|
|
|
|
+ return ContextCompat.getColor(mActivity, R.color.text_blue);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
return TableConfig.INVALID_COLOR;
|
|
return TableConfig.INVALID_COLOR;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- }
|
|
|
|
|
|
|
+// }
|
|
|
|
|
|
|
|
mSmartTable.postDelayed(new Runnable() {
|
|
mSmartTable.postDelayed(new Runnable() {
|
|
|
@Override
|
|
@Override
|
|
@@ -952,7 +1124,7 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
@Override
|
|
@Override
|
|
|
public void onDestroyView() {
|
|
public void onDestroyView() {
|
|
|
super.onDestroyView();
|
|
super.onDestroyView();
|
|
|
- ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
|
|
|
|
|
|
|
+ ((FunctionActivity) getActivity()).setListIconIvVisible(false);
|
|
|
CommonUtil.closeKeybord(storage_recharge_collect_ets, mActivity);
|
|
CommonUtil.closeKeybord(storage_recharge_collect_ets, mActivity);
|
|
|
((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(getString(R.string.title_outbound_rechargeadd));
|
|
((TextView) (getActivity().findViewById(R.id.tv_actionbar_withback))).setText(getString(R.string.title_outbound_rechargeadd));
|
|
|
SharedPreUtil.removeString(mActivity,Constants.STORAGEERECHADD);
|
|
SharedPreUtil.removeString(mActivity,Constants.STORAGEERECHADD);
|
|
@@ -961,9 +1133,10 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
public void onHiddenChanged(boolean hidden) {
|
|
public void onHiddenChanged(boolean hidden) {
|
|
|
super.onHiddenChanged(hidden);
|
|
super.onHiddenChanged(hidden);
|
|
|
if (hidden) {
|
|
if (hidden) {
|
|
|
- ((FunctionActivity) getActivity()).setMoreBtnVisible(false);
|
|
|
|
|
|
|
+ ((FunctionActivity) getActivity()).setListIconIvVisible(false);
|
|
|
} else {
|
|
} else {
|
|
|
FunctionActivity.setTitle(getString(R.string.title_outbound_rechargeadd));
|
|
FunctionActivity.setTitle(getString(R.string.title_outbound_rechargeadd));
|
|
|
|
|
+ ((FunctionActivity) getActivity()).setListIconIvVisible(true);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -971,5 +1144,6 @@ public class OutboundListAdd_Fragment extends BaseFragment implements OnColumnIt
|
|
|
public void onDestroy() {
|
|
public void onDestroy() {
|
|
|
super.onDestroy();
|
|
super.onDestroy();
|
|
|
SharedPreUtil.removeString(mActivity,Constants.STORAGEERECHADD);
|
|
SharedPreUtil.removeString(mActivity,Constants.STORAGEERECHADD);
|
|
|
|
|
+ ((FunctionActivity) getActivity()).setListIconIvVisible(true);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|