运单签收
This commit is contained in:
parent
9faccae17d
commit
cc940976d3
@ -84,7 +84,8 @@ android {
|
||||
JPUSH_APPKEY : "fba6f55621c670d8c1fe9191",
|
||||
//暂时填写默认值即可.
|
||||
JPUSH_CHANNEL: "developer-n"]
|
||||
buildConfigField("String", "BASE_URL", "\"https://app.test.dahehuoyun.com/api/\"")
|
||||
// buildConfigField("String", "BASE_URL", "\"https://app.test.dahehuoyun.com/api/\"")
|
||||
buildConfigField("String", "BASE_URL", "\"http://192.168.1.118:8080/api/\"")
|
||||
buildConfigField "boolean", "isTest", "true"
|
||||
//APP名称,可以在androidMainfest中引用
|
||||
resValue "string", "appName", "货主端测试"
|
||||
|
@ -143,4 +143,12 @@ public class OrderRequest {
|
||||
Request re = OkHttpUtil.posts(new OkDate(UrlManager.getOrderRevoke(), "post", MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestTest.test(1,ORDER_REVOKE,re,con,hd);
|
||||
}
|
||||
|
||||
//货主货源签收
|
||||
public void orderSigin(int waybillId){
|
||||
Map<String,Object> map=new HashMap<>();
|
||||
// map.put("isPlatDispatch",0);
|
||||
Request re = OkHttpUtil.posts(new OkDate(UrlManager.getOrderSigin()+"?waybillId="+waybillId, "post", MapUtil.mapJson(map)),getToken(con),con);
|
||||
RequestTest.test(1,"order_sign",re,con,hd);
|
||||
}
|
||||
}
|
||||
|
@ -158,6 +158,7 @@ public class UrlManager {
|
||||
private static final String ORDER_DEL = "/app/shipper/order/orderDel";
|
||||
//货源撤销
|
||||
private static final String ORDER_REVOKE = "/cost/cancelOrder";
|
||||
private static final String ORDER_SIGIN = "/waybill/confirmUnload";
|
||||
// private static final String ORDER_REVOKE = "/app/shipper/order/orderRevoke";
|
||||
//货源查询状态列表
|
||||
private static final String ORDER_STATELIST = "/app/shipper/order/orderStateList";
|
||||
@ -485,6 +486,10 @@ public class UrlManager {
|
||||
return BASE_URL + ORDER_REVOKE;
|
||||
}
|
||||
|
||||
public static String getOrderSigin() {
|
||||
return BASE_URL + ORDER_SIGIN;
|
||||
}
|
||||
|
||||
public static String getOrderStatelist() {
|
||||
return BASE_URL + ORDER_STATELIST;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ public class OrderListActivity extends BaseAppCompatActivity {
|
||||
|
||||
private UserBean user;
|
||||
private TabSegment ts;
|
||||
private String[] titles={"全部","待调度","已装货","已卸货","已结算","草稿箱"};
|
||||
private String[] titles={"全部","待调度","已装货","已卸货","待结算","草稿箱"};
|
||||
private ViewPager vp;
|
||||
|
||||
@Override
|
||||
|
@ -201,6 +201,7 @@ public class OrderList3Fragment extends BaseFragment {
|
||||
Button btn = v.findViewById(R.id.btn);
|
||||
ImageView state_img = v.findViewById(R.id.state_img);
|
||||
Button btnAgain = v.findViewById(R.id.btnAgain);
|
||||
btnAgain.setText("确认卸货");
|
||||
btnAgain.setOnClickListener(v1 -> {
|
||||
// Intent in=new Intent(con, NodeInfoActivity.class);
|
||||
Intent in = new Intent(con, AnotherOrderActivity.class);
|
||||
|
@ -91,10 +91,10 @@ public class OrderList4Fragment extends BaseFragment {
|
||||
if (index == 1) {
|
||||
initData();
|
||||
} else {
|
||||
if(olb.getData().getList().size()==0){
|
||||
dataKey=false;
|
||||
Toast.makeText(con,"没有更多了",Toast.LENGTH_SHORT).show();
|
||||
}else{
|
||||
if (olb.getData().getList().size() == 0) {
|
||||
dataKey = false;
|
||||
Toast.makeText(con, "没有更多了", Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
addData();
|
||||
}
|
||||
}
|
||||
@ -114,6 +114,19 @@ public class OrderList4Fragment extends BaseFragment {
|
||||
}
|
||||
CacheGroup.cacheList.remove(OrderRequest.ORDER_REVOKE);
|
||||
}
|
||||
|
||||
//签收
|
||||
if (CacheGroup.cacheList.get("order_sign") != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get("order_sign"), BaseBean.class);
|
||||
if (bb.getCode() == 200) {
|
||||
sr.autoRefresh();
|
||||
ToastUtil.show(con, "收货成功");
|
||||
} else {
|
||||
sr.autoRefresh();
|
||||
ToastUtil.show(con, bb.getMsg());
|
||||
}
|
||||
CacheGroup.cacheList.remove("order_sign");
|
||||
}
|
||||
//删除
|
||||
if (CacheGroup.cacheList.get(OrderRequest.ORDER_DEL) != null) {
|
||||
BaseBean bb = gson.fromJson(CacheGroup.cacheList.get(OrderRequest.ORDER_DEL), BaseBean.class);
|
||||
@ -198,8 +211,20 @@ public class OrderList4Fragment extends BaseFragment {
|
||||
case R.layout.order_item:
|
||||
WaybillListBean.DataDTO.ListDTO ld = (WaybillListBean.DataDTO.ListDTO) o;
|
||||
Button btn = v.findViewById(R.id.btn);
|
||||
LinearLayout llQrsh = v.findViewById(R.id.llQrsh);
|
||||
ImageView state_img = v.findViewById(R.id.state_img);
|
||||
Button btnQrsh = v.findViewById(R.id.btnQrsh);
|
||||
Button btnAgain = v.findViewById(R.id.btnAgain);
|
||||
llQrsh.setVisibility(View.VISIBLE);
|
||||
btnQrsh.setOnClickListener(v1 -> {
|
||||
new XPopup.Builder(con)
|
||||
.asConfirm("确认收货", "确认 " + ld.getOrderNum() + "收货么?",
|
||||
"取消", "确认",
|
||||
() -> {
|
||||
or.orderSigin(ld.getWaybillId());
|
||||
}, null, false, R.layout.alert_ok_cancel) //最后一个参数绑定已有布局
|
||||
.show();
|
||||
});
|
||||
btnAgain.setOnClickListener(v1 -> {
|
||||
// Intent in=new Intent(con, NodeInfoActivity.class);
|
||||
Intent in = new Intent(con, AnotherOrderActivity.class);
|
||||
@ -223,7 +248,7 @@ public class OrderList4Fragment extends BaseFragment {
|
||||
ClipData clip = ClipData.newPlainText("label", text);
|
||||
// 将数据设置到剪切板
|
||||
clipboard.setPrimaryClip(clip);
|
||||
ToastUtil.show(con, text+"复制到剪切板");
|
||||
ToastUtil.show(con, text + "复制到剪切板");
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
@ -58,7 +58,8 @@ import java.util.Map;
|
||||
*/
|
||||
public class OrderList5Fragment extends BaseFragment {
|
||||
|
||||
private int type=102005;
|
||||
// private int type=102005;
|
||||
private int type=200005;
|
||||
private WaybillListBean olb;
|
||||
private WaybillRequest wr;
|
||||
private OrderRequest or;
|
||||
|
@ -21,7 +21,7 @@ import org.greenrobot.eventbus.Subscribe
|
||||
*/
|
||||
class WayBillsFragment : BaseFragment() {
|
||||
var list = mutableListOf<Fragment>()
|
||||
private val titles = arrayOf("全部", "待调度", "已装货", "已卸货", "已结算")
|
||||
private val titles = arrayOf("全部", "待调度", "已装货", "已卸货", "待结算")
|
||||
|
||||
override fun getContentViewLayoutID() = R.layout.fragment_waybill_list
|
||||
|
||||
|
@ -210,6 +210,31 @@
|
||||
android:textColor="#ffd95959"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:id="@+id/llQrsh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<View
|
||||
android:layout_width="@dimen/dp_1"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:background="#EFEFEF" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btnQrsh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_36"
|
||||
android:background="@null"
|
||||
android:elevation="@dimen/dp_3"
|
||||
android:gravity="center"
|
||||
android:text="确认收货"
|
||||
android:textColor="#00BCD4"
|
||||
android:textSize="@dimen/sp_16" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/llAgain"
|
||||
android:layout_width="match_parent"
|
||||
|
Loading…
Reference in New Issue
Block a user