|
|
@@ -9,6 +9,8 @@ import android.view.View;
|
|
|
import android.view.inputmethod.EditorInfo;
|
|
|
import android.widget.Button;
|
|
|
import android.widget.LinearLayout;
|
|
|
+import android.widget.RadioButton;
|
|
|
+import android.widget.RadioGroup;
|
|
|
import android.widget.TextView;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
@@ -48,7 +50,9 @@ public class LabeLreprintingFragment extends BaseFragment implements View.OnClic
|
|
|
private TextView tv_hint1;
|
|
|
private JSONArray dataArray;
|
|
|
private Button btn_starts;
|
|
|
-
|
|
|
+ private RadioGroup rg_hui;
|
|
|
+ private RadioButton rb_ok;
|
|
|
+ private RadioButton rb_no;
|
|
|
@Override
|
|
|
protected int getLayout() {
|
|
|
return R.layout.fragment_labe_lreprnting;
|
|
|
@@ -62,6 +66,9 @@ public class LabeLreprintingFragment extends BaseFragment implements View.OnClic
|
|
|
line_hint = root.findViewById(R.id.line_hint);
|
|
|
tv_hint1 = root.findViewById(R.id.tv_hint1);
|
|
|
btn_starts = root.findViewById(R.id.btn_starts);
|
|
|
+ rg_hui = root.findViewById(R.id.rg_hui);
|
|
|
+ rb_ok = root.findViewById(R.id.rb_ok);
|
|
|
+ rb_no = root.findViewById(R.id.rb_no);
|
|
|
storage_recharge_collect_ets.requestFocus();
|
|
|
|
|
|
}
|
|
|
@@ -69,7 +76,8 @@ public class LabeLreprintingFragment extends BaseFragment implements View.OnClic
|
|
|
|
|
|
@Override
|
|
|
protected void initEvents() {
|
|
|
- getPrintTemplate();
|
|
|
+ rb_ok.setChecked(true);
|
|
|
+ getPrintTemplate("Lotno!PDAPrint");
|
|
|
storage_recharge_collect_ets.setOnEditorActionListener(new TextView.OnEditorActionListener() {
|
|
|
@Override
|
|
|
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
|
|
@@ -89,17 +97,31 @@ public class LabeLreprintingFragment extends BaseFragment implements View.OnClic
|
|
|
getgetinfo(storage_recharge_collect_ets.getText().toString().trim());
|
|
|
}
|
|
|
});
|
|
|
+ rg_hui.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
|
|
+ @SuppressLint("NonConstantResourceId")
|
|
|
+ @Override
|
|
|
+ public void onCheckedChanged(RadioGroup radioGroup, int checkid) {
|
|
|
+ switch (checkid){
|
|
|
+ case R.id.rb_ok:
|
|
|
+ getPrintTemplate("Lotno!PDAPrint");
|
|
|
+ break;
|
|
|
+ case R.id.rb_no:
|
|
|
+ getPrintTemplate("PreBarcode");
|
|
|
+ break;
|
|
|
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
}
|
|
|
- private void getPrintTemplate() {
|
|
|
+ private void getPrintTemplate(String caller) {
|
|
|
VolleyRequest.getInstance().stringRequest(mStringRequest,
|
|
|
new HttpParams.Builder()
|
|
|
.url(GloableParams.ADDRESS_BARINFO_PRINTMODEL)
|
|
|
.method(Request.Method.GET)
|
|
|
.flag(0)
|
|
|
.tag("barinfoPrint")
|
|
|
- .addParam("caller", "Lotno!PDAPrint")//Barcode!PDAPrint仓库
|
|
|
+ .addParam("caller", caller)//Barcode!PDAPrint仓库
|
|
|
.build(), new HttpCallback() {
|
|
|
@Override
|
|
|
public void onSuccess(int flag, Object o) throws Exception {
|