|
@@ -96,7 +96,7 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
private PopupWindow mMenuPopupWindow;
|
|
private PopupWindow mMenuPopupWindow;
|
|
|
private Fragment mFragment;
|
|
private Fragment mFragment;
|
|
|
private SmartTable mSmartTable;
|
|
private SmartTable mSmartTable;
|
|
|
- private Column<String> va_classColumn,va_codeColumn,va_vendnameColumn,va_vendcodeColumn,va_inmancolumn,va_DELETEColumn;
|
|
|
|
|
|
|
+ private Column<String> va_sourcecode,va_codeColumn,va_vendnameColumn,va_vendcodeColumn,va_inmancolumn,va_DELETEColumn;
|
|
|
private TableData<MakerecordBean> mTableData;
|
|
private TableData<MakerecordBean> mTableData;
|
|
|
private List<MakerecordBean> mFilterStorageInBeans;
|
|
private List<MakerecordBean> mFilterStorageInBeans;
|
|
|
private ImageView mScanImageView;
|
|
private ImageView mScanImageView;
|
|
@@ -109,13 +109,14 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
private AutoCompleteTextView et_linecode_smts;
|
|
private AutoCompleteTextView et_linecode_smts;
|
|
|
private ImageView iocout_smts;
|
|
private ImageView iocout_smts;
|
|
|
private ImageView iv_popuwindow;
|
|
private ImageView iv_popuwindow;
|
|
|
- private AutoCompleteTextView ce_resources;
|
|
|
|
|
|
|
+ private TextView ce_resources;
|
|
|
private ImageView iv_resources_delete;
|
|
private ImageView iv_resources_delete;
|
|
|
private ImageView iv_resources;
|
|
private ImageView iv_resources;
|
|
|
private TextView tv_pr_code;
|
|
private TextView tv_pr_code;
|
|
|
private TextView tv_pr_detail;
|
|
private TextView tv_pr_detail;
|
|
|
private TextView tv_save;
|
|
private TextView tv_save;
|
|
|
private RadioGroup rg_change;
|
|
private RadioGroup rg_change;
|
|
|
|
|
+ private RadioButton rb_pepole;
|
|
|
private RadioButton rb_equipment;
|
|
private RadioButton rb_equipment;
|
|
|
private RadioButton rb_fixture;
|
|
private RadioButton rb_fixture;
|
|
|
private RadioButton rb_ingredients;
|
|
private RadioButton rb_ingredients;
|
|
@@ -140,10 +141,11 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
private List<String> masterFuncList;
|
|
private List<String> masterFuncList;
|
|
|
private String maFunName = null;
|
|
private String maFunName = null;
|
|
|
private ImageView shaopwork_id;
|
|
private ImageView shaopwork_id;
|
|
|
- private List<String> stringList;
|
|
|
|
|
- private Set<String> setstring;
|
|
|
|
|
|
|
+
|
|
|
private ImageView tv_dc_emcode_delete;
|
|
private ImageView tv_dc_emcode_delete;
|
|
|
private List<User> list;
|
|
private List<User> list;
|
|
|
|
|
+ private TextView tv_changeresources;
|
|
|
|
|
+ private User user;
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
protected int getLayout() {
|
|
protected int getLayout() {
|
|
@@ -172,6 +174,7 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
tv_pr_detail = root.findViewById(R.id.tv_pr_detail);
|
|
tv_pr_detail = root.findViewById(R.id.tv_pr_detail);
|
|
|
tv_save = root.findViewById(R.id.tv_save);
|
|
tv_save = root.findViewById(R.id.tv_save);
|
|
|
rg_change = root.findViewById(R.id.rg_change);
|
|
rg_change = root.findViewById(R.id.rg_change);
|
|
|
|
|
+ rb_pepole = root.findViewById(R.id.rb_pepole);
|
|
|
rb_equipment = root.findViewById(R.id.rb_equipment);
|
|
rb_equipment = root.findViewById(R.id.rb_equipment);
|
|
|
rb_fixture = root.findViewById(R.id.rb_fixture);
|
|
rb_fixture = root.findViewById(R.id.rb_fixture);
|
|
|
rb_ingredients = root.findViewById(R.id.rb_ingredients);
|
|
rb_ingredients = root.findViewById(R.id.rb_ingredients);
|
|
@@ -182,6 +185,7 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
masterSpinner = (Spinner) root.findViewById(R.id.sp_login);
|
|
masterSpinner = (Spinner) root.findViewById(R.id.sp_login);
|
|
|
shaopwork_id = root.findViewById(R.id.shaopwork_id);
|
|
shaopwork_id = root.findViewById(R.id.shaopwork_id);
|
|
|
tv_dc_emcode_delete = root.findViewById(R.id.tv_dc_emcode_delete);
|
|
tv_dc_emcode_delete = root.findViewById(R.id.tv_dc_emcode_delete);
|
|
|
|
|
+ tv_changeresources = root.findViewById(R.id.tv_changeresources);
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -219,12 +223,12 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ va_sourcecode = new Column<String>("岗位资源", "MBR_SOURCECODE");
|
|
|
|
|
+ va_inmancolumn = new Column<String>("操作员", "MBR_INMAN");
|
|
|
|
|
+ va_codeColumn = new Column<String>("日期", "MBR_INDATE");
|
|
|
|
|
+// va_classColumn = new Column<String>("单据编号", "MBR_MAKECODE");
|
|
|
va_vendnameColumn = new Column<String>("设备编号", "MBR_BARCODE");
|
|
va_vendnameColumn = new Column<String>("设备编号", "MBR_BARCODE");
|
|
|
- va_vendnameColumn.setFixed(true);
|
|
|
|
|
va_vendcodeColumn = new Column<String>("名称", "PR_DETAIL");
|
|
va_vendcodeColumn = new Column<String>("名称", "PR_DETAIL");
|
|
|
- va_codeColumn = new Column<String>("日期", "MBR_INDATE");
|
|
|
|
|
- va_inmancolumn = new Column<String>("操作员", "MBR_INMAN");
|
|
|
|
|
- va_classColumn = new Column<String>("单据编号", "MBR_MAKECODE");
|
|
|
|
|
va_DELETEColumn = new Column<String>("操作", "MBR_DELETE");
|
|
va_DELETEColumn = new Column<String>("操作", "MBR_DELETE");
|
|
|
va_DELETEColumn.setOnColumnItemClickListener(this);
|
|
va_DELETEColumn.setOnColumnItemClickListener(this);
|
|
|
mScanImageView.setOnClickListener(this);
|
|
mScanImageView.setOnClickListener(this);
|
|
@@ -288,6 +292,7 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
public void onClick(View v) {
|
|
public void onClick(View v) {
|
|
|
et_linecode_smts.setText("");
|
|
et_linecode_smts.setText("");
|
|
|
et_linecode_smts.requestFocus();
|
|
et_linecode_smts.requestFocus();
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
iv_popuwindow.setOnClickListener(new View.OnClickListener() {
|
|
iv_popuwindow.setOnClickListener(new View.OnClickListener() {
|
|
@@ -298,49 +303,49 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
/**----------------------------------岗位资源------------------------------**/
|
|
/**----------------------------------岗位资源------------------------------**/
|
|
|
- ce_resources.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
|
|
|
|
- @Override
|
|
|
|
|
- public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
|
|
|
|
- if (actionId == EditorInfo.IME_ACTION_DONE
|
|
|
|
|
- || actionId == EditorInfo.IME_ACTION_SEND
|
|
|
|
|
- || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
|
|
|
|
|
- String va_code = ce_resources.getText().toString().trim();
|
|
|
|
|
- getfuzzySearchSourceData(va_code,"");
|
|
|
|
|
- return true;
|
|
|
|
|
- }
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- ce_resources.addTextChangedListener(new TextWatcher() {
|
|
|
|
|
- @Override
|
|
|
|
|
- public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- @Override
|
|
|
|
|
- public void onTextChanged(CharSequence s, int start, int before, int count) {
|
|
|
|
|
- if (s.length() >=2) {
|
|
|
|
|
- getfuzzySearchSourceData(ce_resources.getText().toString().trim(),"");
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- @Override
|
|
|
|
|
- public void afterTextChanged(Editable s) {
|
|
|
|
|
- if (s == null || s.length() == 0) {
|
|
|
|
|
- iv_resources_delete.setVisibility(View.GONE);
|
|
|
|
|
- } else {
|
|
|
|
|
- iv_resources_delete.setVisibility(View.VISIBLE);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- iv_resources_delete.setOnClickListener(new View.OnClickListener() {
|
|
|
|
|
- @Override
|
|
|
|
|
- public void onClick(View v) {
|
|
|
|
|
- ce_resources.setText("");
|
|
|
|
|
- ce_resources.requestFocus();
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+// ce_resources.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
|
|
|
|
+// @Override
|
|
|
|
|
+// public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
|
|
|
|
+// if (actionId == EditorInfo.IME_ACTION_DONE
|
|
|
|
|
+// || actionId == EditorInfo.IME_ACTION_SEND
|
|
|
|
|
+// || (event != null && event.getAction() == KeyEvent.ACTION_DOWN && event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) {
|
|
|
|
|
+// String va_code = ce_resources.getText().toString().trim();
|
|
|
|
|
+// getfuzzySearchSourceData(va_code,"");
|
|
|
|
|
+// return true;
|
|
|
|
|
+// }
|
|
|
|
|
+// return false;
|
|
|
|
|
+// }
|
|
|
|
|
+// });
|
|
|
|
|
+// ce_resources.addTextChangedListener(new TextWatcher() {
|
|
|
|
|
+// @Override
|
|
|
|
|
+// public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// @Override
|
|
|
|
|
+// public void onTextChanged(CharSequence s, int start, int before, int count) {
|
|
|
|
|
+// if (s.length() >=2) {
|
|
|
|
|
+// getfuzzySearchSourceData(ce_resources.getText().toString().trim(),"");
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// @Override
|
|
|
|
|
+// public void afterTextChanged(Editable s) {
|
|
|
|
|
+// if (s == null || s.length() == 0) {
|
|
|
|
|
+// iv_resources_delete.setVisibility(View.GONE);
|
|
|
|
|
+// } else {
|
|
|
|
|
+// iv_resources_delete.setVisibility(View.VISIBLE);
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// });
|
|
|
|
|
+// iv_resources_delete.setOnClickListener(new View.OnClickListener() {
|
|
|
|
|
+// @Override
|
|
|
|
|
+// public void onClick(View v) {
|
|
|
|
|
+// ce_resources.setText("");
|
|
|
|
|
+// ce_resources.requestFocus();
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
+// });
|
|
|
iv_resources.setOnClickListener(new View.OnClickListener() {
|
|
iv_resources.setOnClickListener(new View.OnClickListener() {
|
|
|
@Override
|
|
@Override
|
|
|
public void onClick(View v) {
|
|
public void onClick(View v) {
|
|
@@ -353,6 +358,10 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
@Override
|
|
@Override
|
|
|
public void onCheckedChanged(RadioGroup radioGroup, int checkid) {
|
|
public void onCheckedChanged(RadioGroup radioGroup, int checkid) {
|
|
|
switch (checkid){
|
|
switch (checkid){
|
|
|
|
|
+ case R.id.rb_pepole:
|
|
|
|
|
+ rb_changetext = "人员岗位";
|
|
|
|
|
+ getDatalistCodes(ce_resources.getText().toString().trim(),work_code_code.getText().toString().trim());
|
|
|
|
|
+ break;
|
|
|
case R.id.rb_equipment:
|
|
case R.id.rb_equipment:
|
|
|
rb_changetext = "设备";
|
|
rb_changetext = "设备";
|
|
|
getDatalistCodes(ce_resources.getText().toString().trim(),work_code_code.getText().toString().trim());
|
|
getDatalistCodes(ce_resources.getText().toString().trim(),work_code_code.getText().toString().trim());
|
|
@@ -381,8 +390,8 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- stringList = new ArrayList<>();
|
|
|
|
|
- setstring = new HashSet<>();
|
|
|
|
|
|
|
+ list = new ArrayList<>();
|
|
|
|
|
+ user = new User();
|
|
|
//人员编号
|
|
//人员编号
|
|
|
tv_dc_emcode.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
|
tv_dc_emcode.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
|
|
@Override
|
|
@Override
|
|
@@ -397,7 +406,16 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+ tv_changeresources.setOnClickListener(new View.OnClickListener() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onClick(View v) {
|
|
|
|
|
+ getsaVeData();
|
|
|
|
|
+ ce_resources.setText("");
|
|
|
|
|
+ tv_dc_emname.setText("");
|
|
|
|
|
+ list.clear();
|
|
|
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
tv_dc_emcode.addTextChangedListener(new TextWatcher() {
|
|
tv_dc_emcode.addTextChangedListener(new TextWatcher() {
|
|
|
@Override
|
|
@Override
|
|
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
|
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
|
|
@@ -424,7 +442,7 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
public void onClick(View v) {
|
|
public void onClick(View v) {
|
|
|
tv_dc_emcode.setText("");
|
|
tv_dc_emcode.setText("");
|
|
|
tv_dc_emcode.requestFocus();
|
|
tv_dc_emcode.requestFocus();
|
|
|
-
|
|
|
|
|
|
|
+ list.clear();
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -453,74 +471,93 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
// ceshiData();
|
|
// ceshiData();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- String inputString ="" ;
|
|
|
|
|
|
|
+ String inputString ="";
|
|
|
public void getNewdc_emcodeData(String input){
|
|
public void getNewdc_emcodeData(String input){
|
|
|
|
|
|
|
|
if (input.isEmpty()){
|
|
if (input.isEmpty()){
|
|
|
- CommonUtil.toastNoRepeat(mActivity, "请输入人员编号");
|
|
|
|
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "请输入人员编号/岗位");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- list = new ArrayList<>();
|
|
|
|
|
- list.clear();
|
|
|
|
|
- String[] split = input.split(",");
|
|
|
|
|
-
|
|
|
|
|
- for (String value : split) {
|
|
|
|
|
- User user=new User();
|
|
|
|
|
- if (!value.isEmpty()) {
|
|
|
|
|
- user.setName(value + ",");
|
|
|
|
|
- list.add(user);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- for (int i = 0; i < list.size(); i++) //外循环是循环的次数
|
|
|
|
|
- {
|
|
|
|
|
- for (int j = list.size() - 1; j > i; j--) //内循环是 外循环一次比较的次数
|
|
|
|
|
- {
|
|
|
|
|
- if (list.get(i).getName().equals(list.get(j).getName()))
|
|
|
|
|
- {
|
|
|
|
|
- list.remove(j);
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- for (int s = 0; s < list.size(); s++) {
|
|
|
|
|
- inputString+= list.get(s).getName();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// String[] split = input.split(",");
|
|
|
|
|
+//
|
|
|
|
|
+// for (String value : split) {
|
|
|
|
|
+// User user=new User();
|
|
|
|
|
+// if (!value.isEmpty()) {
|
|
|
|
|
+// user.setName(value + ",");
|
|
|
|
|
+// list.add(user);
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// for (int i = 0; i < list.size(); i++) //外循环是循环的次数
|
|
|
|
|
+// {
|
|
|
|
|
+// for (int j = list.size() - 1; j > i; j--) //内循环是 外循环一次比较的次数
|
|
|
|
|
+// {
|
|
|
|
|
+// if (list.get(i).getName().equals(list.get(j).getName()))
|
|
|
|
|
+// {
|
|
|
|
|
+// list.remove(j);
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+// for (int s = 0; s < list.size(); s++) {
|
|
|
|
|
+// inputString+= list.get(s).getName();
|
|
|
|
|
+// }
|
|
|
progressDialog.show();
|
|
progressDialog.show();
|
|
|
VollyRequest.getInstance().stringRequest(new HttpParams.Builder()
|
|
VollyRequest.getInstance().stringRequest(new HttpParams.Builder()
|
|
|
- .url(GloableParams.ASTATIONTHE_SELECT_GETEMNAME)
|
|
|
|
|
|
|
+ .url(GloableParams.ASTATIONTHE_SELECT_MAKEMANSOURCEINF)
|
|
|
.method(Request.Method.GET)
|
|
.method(Request.Method.GET)
|
|
|
- .addParam("em_code",inputString)
|
|
|
|
|
|
|
+ .addParam("data",input)
|
|
|
.build(), new HttpCallback() {
|
|
.build(), new HttpCallback() {
|
|
|
@Override
|
|
@Override
|
|
|
public void onSuccess(int flag, Object o) throws Exception {//DeviceChange!Use
|
|
public void onSuccess(int flag, Object o) throws Exception {//DeviceChange!Use
|
|
|
progressDialog.dismiss();
|
|
progressDialog.dismiss();
|
|
|
String result = o.toString();
|
|
String result = o.toString();
|
|
|
JSONObject resultObject = JSON.parseObject(result);
|
|
JSONObject resultObject = JSON.parseObject(result);
|
|
|
- JSONObject dataObject = resultObject.getJSONObject("items");
|
|
|
|
|
- String de_name = FastjsonUtil.getText(dataObject, "em_name");
|
|
|
|
|
- tv_dc_emname.setText(de_name);
|
|
|
|
|
- tv_dc_emcode.setText(inputString+"");
|
|
|
|
|
- tv_dc_emcode.setSelection(tv_dc_emcode.getText().toString().length());
|
|
|
|
|
|
|
+ JSONObject dataObject = resultObject.getJSONObject("InfoPush");
|
|
|
|
|
+ String de_name = FastjsonUtil.getText(dataObject, "name");
|
|
|
|
|
+ String type = FastjsonUtil.getText(dataObject, "type");
|
|
|
|
|
+ if (type.equals("Employee")){
|
|
|
|
|
+ if (ce_resources.getText().toString().trim().isEmpty()){
|
|
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "请先扫描岗位条码");
|
|
|
|
|
+ }else {
|
|
|
|
|
+ user=new User();
|
|
|
|
|
+ user.setName(de_name+",");
|
|
|
|
|
+ list.add(user);
|
|
|
|
|
+ for (int i = 0; i < list.size(); i++) //外循环是循环的次数
|
|
|
|
|
+ {
|
|
|
|
|
+ for (int j = list.size() - 1; j > i; j--) //内循环是 外循环一次比较的次数
|
|
|
|
|
+ {
|
|
|
|
|
+ if (list.get(i).getName().equals(list.get(j).getName()))
|
|
|
|
|
+ {
|
|
|
|
|
+ list.remove(j);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ for (int s = 0; s < list.size(); s++) {
|
|
|
|
|
+ inputString+= list.get(s).getName();
|
|
|
|
|
+ }
|
|
|
|
|
+ tv_dc_emname.setText(inputString);
|
|
|
|
|
+ }
|
|
|
|
|
+ }else if (type.equals("Source")){
|
|
|
|
|
+ ce_resources.setText(de_name);
|
|
|
|
|
+ }
|
|
|
|
|
+ tv_dc_emcode.setText("");
|
|
|
|
|
+ tv_dc_emcode.requestFocus();
|
|
|
inputString="";
|
|
inputString="";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public void onFail(int flag, String failStr) throws Exception {
|
|
public void onFail(int flag, String failStr) throws Exception {
|
|
|
progressDialog.dismiss();
|
|
progressDialog.dismiss();
|
|
|
- inputString="";
|
|
|
|
|
CommonUtil.toastNoRepeat(mActivity, failStr);
|
|
CommonUtil.toastNoRepeat(mActivity, failStr);
|
|
|
- for (int s = 0; s < list.size(); s++) {
|
|
|
|
|
- if (failStr.contains(list.get(s).getName().replace(",",""))){
|
|
|
|
|
- list.remove(s);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- for (int s = 0; s < list.size(); s++) {
|
|
|
|
|
- inputString+= list.get(s).getName();
|
|
|
|
|
- }
|
|
|
|
|
- tv_dc_emcode.setText(inputString+"");
|
|
|
|
|
|
|
+ tv_dc_emcode.setText("");
|
|
|
|
|
+ tv_dc_emcode.requestFocus();
|
|
|
tv_dc_emcode.setSelection(tv_dc_emcode.getText().toString().length());
|
|
tv_dc_emcode.setSelection(tv_dc_emcode.getText().toString().length());
|
|
|
inputString="";
|
|
inputString="";
|
|
|
}
|
|
}
|
|
@@ -596,11 +633,10 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
}
|
|
}
|
|
|
ipAndlinecodePortAdapter.setmList(linecodeBeanList);
|
|
ipAndlinecodePortAdapter.setmList(linecodeBeanList);
|
|
|
ipAndlinecodePortAdapter.notifyDataSetChanged();
|
|
ipAndlinecodePortAdapter.notifyDataSetChanged();
|
|
|
-
|
|
|
|
|
- getDatalistCodes(ce_resources.getText().toString().trim(),work_code_code.getText().toString().trim());
|
|
|
|
|
- } catch (JSONException e) {
|
|
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
}
|
|
}
|
|
|
|
|
+ getDatalistCodes(ce_resources.getText().toString().trim(),work_code_code.getText().toString().trim());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -679,7 +715,7 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
resourcesBeanList.clear();
|
|
resourcesBeanList.clear();
|
|
|
MyArrayAdapter<String> mAutoStringAdapte = new MyArrayAdapter<String>(mActivity, android.R.layout.simple_dropdown_item_1line, mAutoStrings);
|
|
MyArrayAdapter<String> mAutoStringAdapte = new MyArrayAdapter<String>(mActivity, android.R.layout.simple_dropdown_item_1line, mAutoStrings);
|
|
|
if (ce_resources != null) {
|
|
if (ce_resources != null) {
|
|
|
- ce_resources.setAdapter(mAutoStringAdapte);
|
|
|
|
|
|
|
+// ce_resources.setAdapter(mAutoStringAdapte);
|
|
|
}
|
|
}
|
|
|
org.json.JSONObject resultObject = new org.json.JSONObject(s);
|
|
org.json.JSONObject resultObject = new org.json.JSONObject(s);
|
|
|
org.json.JSONArray dataArray = resultObject.optJSONArray("data");
|
|
org.json.JSONArray dataArray = resultObject.optJSONArray("data");
|
|
@@ -729,11 +765,12 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private void getDatalistCodes(String sourcecode,String macode){
|
|
private void getDatalistCodes(String sourcecode,String macode){
|
|
|
- if (macode.isEmpty()||sourcecode.isEmpty()){
|
|
|
|
|
|
|
+ if (macode.isEmpty()){
|
|
|
|
|
+ CommonUtil.toastNoRepeat(mActivity, "工单号为空");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- if (rb_equipment.isChecked()){
|
|
|
|
|
- rb_changetext="设备";
|
|
|
|
|
|
|
+ if (rb_pepole.isChecked()){
|
|
|
|
|
+ rb_changetext="人员岗位";
|
|
|
}
|
|
}
|
|
|
progressDialog.show();
|
|
progressDialog.show();
|
|
|
VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
|
|
VolleyRequest.getInstance().stringRequest(new HttpParams.Builder()
|
|
@@ -742,7 +779,7 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
.tag(TAG + "getindatalist")
|
|
.tag(TAG + "getindatalist")
|
|
|
.flag(0)
|
|
.flag(0)
|
|
|
.addParam("macode", macode)
|
|
.addParam("macode", macode)
|
|
|
- .addParam("sourcecode", sourcecode)
|
|
|
|
|
|
|
+// .addParam("sourcecode", sourcecode)
|
|
|
.addParam("type", rb_changetext)
|
|
.addParam("type", rb_changetext)
|
|
|
.build(), new HttpCallback() {
|
|
.build(), new HttpCallback() {
|
|
|
@Override
|
|
@Override
|
|
@@ -821,7 +858,7 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
@Override
|
|
@Override
|
|
|
public void onSuccess(int flag, Object o) throws Exception {
|
|
public void onSuccess(int flag, Object o) throws Exception {
|
|
|
progressDialog.dismiss();
|
|
progressDialog.dismiss();
|
|
|
- CommonUtil.toastNoRepeat(mActivity, "删除成功");
|
|
|
|
|
|
|
+ CommonUtil.toastYESRepeat(mActivity, "删除成功");
|
|
|
getDatalistCodes(ce_resources.getText().toString().trim(),work_code_code.getText().toString().trim());
|
|
getDatalistCodes(ce_resources.getText().toString().trim(),work_code_code.getText().toString().trim());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -835,8 +872,8 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void getsaVeData(){
|
|
public void getsaVeData(){
|
|
|
- if (rb_equipment.isChecked()){
|
|
|
|
|
- rb_changetext="设备";
|
|
|
|
|
|
|
+ if (rb_pepole.isChecked()){
|
|
|
|
|
+ rb_changetext="人员岗位";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
String ce_work_codetrim = work_code_code.getText().toString().trim();
|
|
String ce_work_codetrim = work_code_code.getText().toString().trim();
|
|
@@ -853,7 +890,7 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
JSONObject object_1 = new JSONObject();
|
|
JSONObject object_1 = new JSONObject();
|
|
|
object_1.put("MBR_MAKECODE", ce_work_codetrim);//工单号
|
|
object_1.put("MBR_MAKECODE", ce_work_codetrim);//工单号
|
|
|
object_1.put("MBR_SOURCECODE", at_stationtrim);//资源
|
|
object_1.put("MBR_SOURCECODE", at_stationtrim);//资源
|
|
|
- object_1.put("MBR_TYPE", rb_changetext);//设备\夹具\辅料
|
|
|
|
|
|
|
+// object_1.put("MBR_TYPE", rb_changetext);//设备\夹具\辅料
|
|
|
object_1.put("MBR_PRODCODE", tv_pr_code.getText());//产品编号
|
|
object_1.put("MBR_PRODCODE", tv_pr_code.getText());//产品编号
|
|
|
object_1.put("MBR_INMAN", tv_dc_emname.getText());//人员名称
|
|
object_1.put("MBR_INMAN", tv_dc_emname.getText());//人员名称
|
|
|
object_1.put("MBR_BARCODE", storage_recharge_collect_et.getText().toString().trim());
|
|
object_1.put("MBR_BARCODE", storage_recharge_collect_et.getText().toString().trim());
|
|
@@ -874,7 +911,7 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
public void onSuccess(int flag, Object o) throws Exception {
|
|
public void onSuccess(int flag, Object o) throws Exception {
|
|
|
progressDialog.dismiss();
|
|
progressDialog.dismiss();
|
|
|
getDatalistCodes(ce_resources.getText().toString().trim(),work_code_code.getText().toString().trim());
|
|
getDatalistCodes(ce_resources.getText().toString().trim(),work_code_code.getText().toString().trim());
|
|
|
- CommonUtil.toastNoRepeat(mActivity, "保存成功");
|
|
|
|
|
|
|
+ CommonUtil.toastYESRepeat(mActivity, "保存成功");
|
|
|
storage_recharge_collect_et.setText("");
|
|
storage_recharge_collect_et.setText("");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -889,7 +926,7 @@ public class ProduceMassageBindingFragment extends BaseFragment implements OnCol
|
|
|
}
|
|
}
|
|
|
private void setFilterTableData(List<MakerecordBean> filterTableData) {
|
|
private void setFilterTableData(List<MakerecordBean> filterTableData) {
|
|
|
mTableData = new TableData<MakerecordBean>("收料单列表", filterTableData,
|
|
mTableData = new TableData<MakerecordBean>("收料单列表", filterTableData,
|
|
|
- va_vendnameColumn,va_vendcodeColumn,va_codeColumn,va_inmancolumn,va_classColumn,va_DELETEColumn);
|
|
|
|
|
|
|
+ va_sourcecode,va_inmancolumn,va_codeColumn,va_vendnameColumn,va_vendcodeColumn,va_DELETEColumn);
|
|
|
mSmartTable.setTableData(mTableData);
|
|
mSmartTable.setTableData(mTableData);
|
|
|
// mSmartTable.requestLayout();
|
|
// mSmartTable.requestLayout();
|
|
|
mSmartTable.postDelayed(new Runnable() {
|
|
mSmartTable.postDelayed(new Runnable() {
|