增加 小料重量核对
parent
cf38cce772
commit
dce00b7e29
Binary file not shown.
@ -0,0 +1,18 @@
|
||||
{
|
||||
"version": 2,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "com.example.pulit",
|
||||
"variantName": "release",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"versionCode": 1,
|
||||
"versionName": "1.0",
|
||||
"outputFile": "app-release.apk"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
package com.example.pulit;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.example.pulit.util.MyOkGoCallback;
|
||||
import com.example.pulit.util.Resust;
|
||||
import com.example.pulit.util.SharedPreferencesUtils;
|
||||
import com.lzy.okgo.OkGo;
|
||||
import com.lzy.okgo.model.Response;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.OnClick;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
public class X3Activity extends BaseActivity {
|
||||
|
||||
@BindView(R.id.x3_code)
|
||||
TextView x3Code;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_x3);
|
||||
ButterKnife.bind(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scanInfo(String info) {
|
||||
x3Code.setText(info);
|
||||
Log.e("TAG", "scanInfo:" + info);
|
||||
dialog.show();
|
||||
OkGo.<Resust>get("http://" + SharedPreferencesUtils.getstring("ip", null) + "/api/xl_material/BindBarrel")
|
||||
.params("code",info)
|
||||
.execute(new MyOkGoCallback() {
|
||||
@Override
|
||||
public void onSuccess(Response<Resust> response) {
|
||||
super.onSuccess(response);
|
||||
dialog.dismiss();
|
||||
Resust body = response.body();
|
||||
boolean b= body.isSuccess();
|
||||
tipDialog.showMsg(b,body.getMsg());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Response<Resust> response) {
|
||||
super.onError(response);
|
||||
dialog.dismiss();
|
||||
Toast.makeText(X3Activity.this, "网络请求失败", Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@OnClick({R.id.info_title_back, R.id.x3_scan})
|
||||
public void onClick(View view) {
|
||||
switch (view.getId()) {
|
||||
case R.id.info_title_back:
|
||||
finish();
|
||||
break;
|
||||
case R.id.x3_scan:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".X3Activity"
|
||||
android:orientation="vertical">
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="55dp"
|
||||
android:background="@color/blue"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
style="@style/title_style"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="小料重量核对" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/info_title_back"
|
||||
android:layout_width="55dp"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="15dp"
|
||||
android:src="@mipmap/icon_back" />
|
||||
</FrameLayout>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="66dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
style="@style/text_view"
|
||||
android:layout_width="100dp"
|
||||
android:layout_height="46dp"
|
||||
android:text="扫描桶条码" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/x3_code"
|
||||
style="@style/text_view2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginLeft="10dp"/>
|
||||
</LinearLayout>
|
||||
<Button
|
||||
android:id="@+id/x3_scan"
|
||||
style="@style/button_style1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="54dp"
|
||||
android:layout_marginStart="20dp"
|
||||
android:layout_marginTop="450dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:text="触发扫描" />
|
||||
|
||||
</LinearLayout>
|
Binary file not shown.
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 6.0 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 2.8 KiB |
Loading…
Reference in New Issue