|
|
@@ -97,6 +97,8 @@ public class PieceActivity extends Activity {
|
|
|
private String userCode1 = "";// 生产工号Code
|
|
|
private String userName1 = "";// 生产工号Name
|
|
|
private String outErrMsg = "";
|
|
|
+ private String StaffCode = "";
|
|
|
+ private String StaffName = "";
|
|
|
// 服务器返回_生产条码检验
|
|
|
private String out_goodsID = "";// 条码对应的产品ID
|
|
|
private String out_logoID = "";// 条码对应的产品ID
|
|
|
@@ -187,7 +189,7 @@ public class PieceActivity extends Activity {
|
|
|
private Spinner pageSpinner; // 版面选择控件
|
|
|
private Spinner goodsCodeSpinner; // 产品编码选择控件
|
|
|
private EditText eatOrderNumber;
|
|
|
- private EditText eatNumber,edt_staff;
|
|
|
+ private TextView eatNumber,edt_staff;
|
|
|
private EditText check_goods_code_search;
|
|
|
private boolean isFirst = true;
|
|
|
private int PACKAGECODE = 17;
|
|
|
@@ -418,7 +420,7 @@ public class PieceActivity extends Activity {
|
|
|
llay_order_number = (LinearLayout) head.findViewById(R.id.llay_order_number);
|
|
|
view_goods_code_search = (LinearLayout) head.findViewById(R.id.view_goods_code_search);
|
|
|
llstaff = (LinearLayout) head.findViewById(R.id.llstaff);
|
|
|
- edt_staff = (EditText) head.findViewById(R.id.edt_staff);
|
|
|
+ edt_staff = (TextView) head.findViewById(R.id.edt_staff);
|
|
|
llay_edt_product_code = (LinearLayout) head.findViewById(R.id.llay_edt_product_code);
|
|
|
edt_product_code = (EditText) head.findViewById(R.id.edt_product_code);
|
|
|
view_edt_product_code = (LinearLayout) head.findViewById(R.id.view_edt_product_code);
|
|
|
@@ -1201,8 +1203,8 @@ public class PieceActivity extends Activity {
|
|
|
String result = jo.optString("Result");
|
|
|
JSONObject object = new JSONObject(result);
|
|
|
outErrMsg = object.optString("ErrMsg");
|
|
|
- String StaffCode = object.optString("StaffCode");
|
|
|
- String StaffName = object.optString("StaffName");
|
|
|
+ StaffCode = object.optString("StaffCode");
|
|
|
+ StaffName = object.optString("StaffName");
|
|
|
if(proId==10||proId ==37) { //10施釉人工 37施釉单厨
|
|
|
edt_staff.setText(StaffCode);
|
|
|
}else {
|
|
|
@@ -1352,15 +1354,15 @@ public class PieceActivity extends Activity {
|
|
|
LogToFile.v("!userCodeIsValid", " return");
|
|
|
return;
|
|
|
}
|
|
|
- barcode.setEnabled(false);
|
|
|
- barcode.setFocusable(false);
|
|
|
- barcode.setFilters(new InputFilter[] { new InputFilter() {
|
|
|
- @Override
|
|
|
- public CharSequence filter(CharSequence source, int start, int end, Spanned dest,
|
|
|
- int dstart, int dend) {
|
|
|
- return source.length() < 1 ? dest.subSequence(dstart, dend) : "";
|
|
|
- }
|
|
|
- } });
|
|
|
+// barcode.setEnabled(false);
|
|
|
+// barcode.setFocusable(false);
|
|
|
+// barcode.setFilters(new InputFilter[] { new InputFilter() {
|
|
|
+// @Override
|
|
|
+// public CharSequence filter(CharSequence source, int start, int end, Spanned dest,
|
|
|
+// int dstart, int dend) {
|
|
|
+// return source.length() < 1 ? dest.subSequence(dstart, dend) : "";
|
|
|
+// }
|
|
|
+// } });
|
|
|
if (collectType == 2) {
|
|
|
if (piecelist != null && piecelist.size() > 0) {
|
|
|
piecelist.removeAll(piecelist);
|
|
|
@@ -1711,6 +1713,7 @@ public class PieceActivity extends Activity {
|
|
|
|
|
|
met.setEnabled(true);
|
|
|
met.setText("");
|
|
|
+ edt_staff.setText("");
|
|
|
met.setFocusable(true);
|
|
|
met.setFocusableInTouchMode(true);
|
|
|
met.requestFocus();
|
|
|
@@ -1807,7 +1810,8 @@ public class PieceActivity extends Activity {
|
|
|
CommonUtil.setDefault(Notification.DEFAULT_VIBRATE,
|
|
|
|
|
|
getApplicationContext());
|
|
|
- CommonUtil.showAlertDialog(status2, message2, PieceActivity.this);
|
|
|
+// CommonUtil.showAlertDialog(status2, message2, PieceActivity.this);
|
|
|
+ Toast.makeText(PieceActivity.this, message2, 3000).show();
|
|
|
if (collectType == 1) {
|
|
|
CommonUtil.playAlertSound(PieceActivity.this);
|
|
|
}
|
|
|
@@ -1951,8 +1955,7 @@ public class PieceActivity extends Activity {
|
|
|
produceCodeIsValid = false;
|
|
|
JSONArray jsonArray2 = new JSONArray(result);
|
|
|
JSONObject object2 = (JSONObject) jsonArray2.get(0);
|
|
|
- String outErrMsg = object2.getString("out_errMsg");
|
|
|
- edt_staff.setText("");
|
|
|
+ String outErrMsg = object2.getString("out_errMsg");
|
|
|
if (TextUtils.isEmpty(outErrMsg)) {
|
|
|
if (proId == PACKAGECODE) { // 包装页面 生产工号是默认带出来的 确定之后 焦点回落逻辑
|
|
|
userCodeIsValid = true;
|
|
|
@@ -2034,6 +2037,7 @@ public class PieceActivity extends Activity {
|
|
|
} else {
|
|
|
met.setEnabled(true);
|
|
|
met.setText("");
|
|
|
+ edt_staff.setText("");
|
|
|
met.setFocusable(true);
|
|
|
met.setFocusableInTouchMode(true);
|
|
|
met.requestFocus();
|
|
|
@@ -2549,7 +2553,7 @@ public class PieceActivity extends Activity {
|
|
|
eatOrderNumber.setText("");
|
|
|
edt_product_code.setText("");
|
|
|
eatNumber.setText("");
|
|
|
- edt_staff.setText("");
|
|
|
+
|
|
|
adapterCustomer = new ProductClassifyAdapter(nullList, PieceActivity.this);
|
|
|
customerSpinner.setAdapter(adapterCustomer);
|
|
|
adapterPage = new ProductClassifyAdapter(nullList, PieceActivity.this);
|
|
|
@@ -4220,6 +4224,7 @@ public class PieceActivity extends Activity {
|
|
|
} else {// 不成功 把生产条码清空 并提示不成功信息 并重新给到焦点
|
|
|
CustomToast.showToast(getApplicationContext(), metresult, 2000);
|
|
|
met.setText("");
|
|
|
+ edt_staff.setText("");
|
|
|
met.setFocusable(true);// 获得焦点
|
|
|
met.setFocusableInTouchMode(true);// 获得焦点
|
|
|
met.requestFocus();
|
|
|
@@ -5023,8 +5028,8 @@ public class PieceActivity extends Activity {
|
|
|
jsonObject.put("userPassword", userPassword);
|
|
|
jsonObject.put("sessionKey", sessionKey);
|
|
|
jsonObject.put("logoid",
|
|
|
- check_glazed_trademarkInfo == null ? "" : check_glazed_trademarkInfo.getDefectId()); // 商标
|
|
|
- jsonObject.put("glazetypeid", check_glaze_colorInfo == null ? "" : check_glaze_colorInfo.getDefectId()); // 釉色
|
|
|
+ check_glazed_trademarkInfo == null ? 0 : check_glazed_trademarkInfo.getDefectId()); // 商标
|
|
|
+ jsonObject.put("glazetypeid", check_glaze_colorInfo == null ? 0 : check_glaze_colorInfo.getDefectId()); // 釉色
|
|
|
JSONArray productionDataEntitys = new JSONArray();
|
|
|
for (Piece p : piecelist) {
|
|
|
JSONObject obj = new JSONObject();
|
|
|
@@ -5040,7 +5045,7 @@ public class PieceActivity extends Activity {
|
|
|
}
|
|
|
jsonObject.put("productionDataEntitys", productionDataEntitys);
|
|
|
client = new WebClient();
|
|
|
- String result = client.doPost(
|
|
|
+ String result = client.doPost(
|
|
|
"http://" + ServerAddress_ip + ":" + ServerAddress_duankou
|
|
|
+ "/DKService/PDAModuleService/SaveBarCodeLogoAndGlazetypeWhile",
|
|
|
jsonObject.toString(), "application/json");
|