Commit db597861 authored by 王海's avatar 王海

组合商品

parent 72263e2c
...@@ -2,8 +2,9 @@ ...@@ -2,8 +2,9 @@
<project version="4"> <project version="4">
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/.idea/TangKuPos.iml" filepath="$PROJECT_DIR$/.idea/TangKuPos.iml" /> <module fileurl="file://$PROJECT_DIR$/TangKuPos.iml" filepath="$PROJECT_DIR$/TangKuPos.iml" />
<module fileurl="file://C:\Users\JM_DEV\AndroidStudioProjects\TangKuPos\TangKuPos.iml" filepath="C:\Users\JM_DEV\AndroidStudioProjects\TangKuPos\TangKuPos.iml" /> <module fileurl="file://C:\Users\JM_DEV\AndroidStudioProjects\TangKuPos\TangKuPos.iml" filepath="C:\Users\JM_DEV\AndroidStudioProjects\TangKuPos\TangKuPos.iml" />
<module fileurl="file://D:\AndroidStudioProject\TangKuPos\.idea\TangKuPos.iml" filepath="D:\AndroidStudioProject\TangKuPos\.idea\TangKuPos.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" /> <module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules> </modules>
</component> </component>
......
...@@ -100,6 +100,10 @@ public class BaleEditFragment extends BaseFragment<BalePresenter, FragmentBaleEd ...@@ -100,6 +100,10 @@ public class BaleEditFragment extends BaseFragment<BalePresenter, FragmentBaleEd
protected void myOnClickListener(View v) { protected void myOnClickListener(View v) {
KeyboardUtils.hideSoftInput(getActivity()); KeyboardUtils.hideSoftInput(getActivity());
switch (v.getId()) { switch (v.getId()) {
case R.id.btn_back: {
pop();
}
break;
case R.id.tv_keyword: { case R.id.tv_keyword: {
start(mPresenter.mBaleSeachShopFragment); start(mPresenter.mBaleSeachShopFragment);
} }
......
package com.xingdata.zzdpos.ui.manage.bale.fragment; package com.xingdata.zzdpos.ui.manage.bale.fragment;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.LinearLayoutManager;
import android.text.Html; import android.text.Html;
import android.view.View; import android.view.View;
import android.widget.TextView;
import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.KeyboardUtils; import com.blankj.utilcode.util.KeyboardUtils;
import com.blankj.utilcode.util.ToastUtils; import com.blankj.utilcode.util.ToastUtils;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
...@@ -18,7 +19,6 @@ import com.xingdata.zzdpos.ui.dialog.LoadingDialog; ...@@ -18,7 +19,6 @@ import com.xingdata.zzdpos.ui.dialog.LoadingDialog;
import com.xingdata.zzdpos.ui.manage.bale.BalePresenter; import com.xingdata.zzdpos.ui.manage.bale.BalePresenter;
import com.xingdata.zzdpos.ui.manage.bale.adpter.BaleIndexAdapter; import com.xingdata.zzdpos.ui.manage.bale.adpter.BaleIndexAdapter;
import com.xingdata.zzdpos.util.OnClickListener; import com.xingdata.zzdpos.util.OnClickListener;
import com.xingdata.zzdpos.util.RecyclerViewUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -45,13 +45,14 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI ...@@ -45,13 +45,14 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI
@Override @Override
public void initView() { public void initView() {
mBaleIndexAdapter = new BaleIndexAdapter(nowData, 3, 20); mBaleIndexAdapter = new BaleIndexAdapter(nowData, 3, 20);
mViewBinding.rcBaleShop.setAdapter(mBaleIndexAdapter); mViewBinding.rcBaleShop.setAdapter(mBaleIndexAdapter);
mViewBinding.rcBaleShop.setLayoutManager(new GridLayoutManager(mContext, 3)); LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity());
mViewBinding.rcBaleShop.addItemDecoration(new RecyclerViewUtil.GridSpacingItemDecoration linearLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
(3, 20, true)); mViewBinding.rcBaleShop.setLayoutManager(linearLayoutManager);
mViewBinding.rcBaleShop.addItemDecoration(new DividerItemDecoration(getActivity(),
DividerItemDecoration.VERTICAL));
mViewBinding.srlProducts.setOnRefreshListener(this::refreshProduct); mViewBinding.srlProducts.setOnRefreshListener(this::refreshProduct);
mBaleIndexAdapter.setOnLoadMoreListener(this::loadMoreProduct, mViewBinding.rcBaleShop); mBaleIndexAdapter.setOnLoadMoreListener(this::loadMoreProduct, mViewBinding.rcBaleShop);
mBaleIndexAdapter.setOnItemClickListener((adapter, view, position) -> clickProduct mBaleIndexAdapter.setOnItemClickListener((adapter, view, position) -> clickProduct
...@@ -69,6 +70,10 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI ...@@ -69,6 +70,10 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI
start(mPresenter.mBaleSeachFragment); start(mPresenter.mBaleSeachFragment);
} }
break; break;
case R.id.btn_back: {
ActivityUtils.finishActivity(getActivity());
}
break;
default: { default: {
} }
...@@ -84,7 +89,7 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI ...@@ -84,7 +89,7 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI
public void setNewData(@Nullable Pager<Ussku> usskuPager, String wd, Boolean isLoadMore, public void setNewData(@Nullable Pager<Ussku> usskuPager, String wd, Boolean isLoadMore,
LoadingDialog LoadingDialog
loadingDialog) { loadingDialog) {
mViewBinding.tvKeyword.setText(wd); mViewBinding.tvKeyword.setText(wd);
mViewBinding.btnGroup.setText(Html.fromHtml(getResources().getString(R.string mViewBinding.btnGroup.setText(Html.fromHtml(getResources().getString(R.string
.tv_bale_count, "<font color='#1f7bdb'><big> " + usskuPager.getTotalRow() + .tv_bale_count, "<font color='#1f7bdb'><big> " + usskuPager.getTotalRow() +
...@@ -107,10 +112,7 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI ...@@ -107,10 +112,7 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI
if (nowData != null) { if (nowData != null) {
mBaleIndexAdapter.setNewData(nowData); mBaleIndexAdapter.setNewData(nowData);
} }
} }
} }
public void setAddData(@Nullable Pager<Ussku> addUsskuPager, Boolean isLoadMore, LoadingDialog public void setAddData(@Nullable Pager<Ussku> addUsskuPager, Boolean isLoadMore, LoadingDialog
...@@ -188,8 +190,8 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI ...@@ -188,8 +190,8 @@ public class BaleIndexFragment extends BaseFragment<BalePresenter, FragmentBaleI
public void onHiddenChanged(boolean hidden) { public void onHiddenChanged(boolean hidden) {
super.onHiddenChanged(hidden); super.onHiddenChanged(hidden);
if (!hidden) { if (!hidden) {
loadingDialog.show((BaseActivity) getActivity()); // loadingDialog.show((BaseActivity) getActivity());
mPresenter.usskuQuery("", loadingDialog); // mPresenter.usskuQuery("", loadingDialog);
} }
} }
......
...@@ -32,6 +32,10 @@ public class BaleSeachFragment extends BaseFragment<BalePresenter, FragmentBaleS ...@@ -32,6 +32,10 @@ public class BaleSeachFragment extends BaseFragment<BalePresenter, FragmentBaleS
@Override @Override
protected void myOnClickListener(View v) { protected void myOnClickListener(View v) {
switch (v.getId()) { switch (v.getId()) {
case R.id.btn_back: {
pop();
}
break;
case R.id.btn_seach: { case R.id.btn_seach: {
loadingDialog.show((BaseActivity) loadingDialog.show((BaseActivity)
getActivity()); getActivity());
......
...@@ -65,6 +65,10 @@ public class BaleSeachShopFragment extends BaseFragment<BalePresenter, ...@@ -65,6 +65,10 @@ public class BaleSeachShopFragment extends BaseFragment<BalePresenter,
@Override @Override
protected void myOnClickListener(View v) { protected void myOnClickListener(View v) {
switch (v.getId()) { switch (v.getId()) {
case R.id.btn_back: {
pop();
}
break;
case R.id.btn_seach: { case R.id.btn_seach: {
loadingDialog.show((BaseActivity) loadingDialog.show((BaseActivity)
getActivity()); getActivity());
......
...@@ -11,8 +11,11 @@ import com.chad.library.adapter.base.BaseQuickAdapter; ...@@ -11,8 +11,11 @@ import com.chad.library.adapter.base.BaseQuickAdapter;
import com.xingdata.zzdpos.C; import com.xingdata.zzdpos.C;
import com.xingdata.zzdpos.R; import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.databinding.ActivityMarketingMenuBinding; import com.xingdata.zzdpos.databinding.ActivityMarketingMenuBinding;
import com.xingdata.zzdpos.ui.manage.bale.BaleActivity;
import com.xingdata.zzdpos.ui.manage.inventory.InventoryActivity;
import com.xingdata.zzdpos.ui.manage.otherselect.OtherSelectActivity; import com.xingdata.zzdpos.ui.manage.otherselect.OtherSelectActivity;
import com.xingdata.zzdpos.ui.manage.replenishment.ReplenishmentActivity; import com.xingdata.zzdpos.ui.manage.replenishment.ReplenishmentActivity;
import com.xingdata.zzdpos.ui.manage.sssku.SsskuActivity;
import com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity; import com.xingdata.zzdpos.ui.marketing.integral.IntegralActivity;
import com.xingdata.zzdpos.ui.marketing.marketingMenu.MarketingMenuActivity; import com.xingdata.zzdpos.ui.marketing.marketingMenu.MarketingMenuActivity;
import com.xingdata.zzdpos.ui.marketing.marketingMenu.adapter.MarketingMenuAdapter; import com.xingdata.zzdpos.ui.marketing.marketingMenu.adapter.MarketingMenuAdapter;
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
android:background="?attr/actionBarItemBackground" android:background="?attr/actionBarItemBackground"
android:contentDescription="@string/all_go_back" android:contentDescription="@string/all_go_back"
android:gravity="center" android:gravity="center"
android:onClick="@{OnClickListener}"
android:padding="@dimen/all_margin" android:padding="@dimen/all_margin"
android:src="@mipmap/back_black" android:src="@mipmap/back_black"
app:layout_constraintLeft_toLeftOf="parent"/> app:layout_constraintLeft_toLeftOf="parent"/>
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/appBack" android:background="@color/gray_zhouyu"
android:focusable="true" android:focusable="true"
android:focusableInTouchMode="true" android:focusableInTouchMode="true"
tools:context="com.xingdata.zzdhd.ui.manager.ticket.ReturnTicketActivity"> tools:context="com.xingdata.zzdhd.ui.manager.ticket.ReturnTicketActivity">
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
android:background="?attr/actionBarItemBackground" android:background="?attr/actionBarItemBackground"
android:contentDescription="@string/all_go_back" android:contentDescription="@string/all_go_back"
android:gravity="center" android:gravity="center"
android:onClick="@{OnClickListener}"
android:padding="@dimen/all_margin" android:padding="@dimen/all_margin"
android:src="@mipmap/back_black" android:src="@mipmap/back_black"
app:layout_constraintLeft_toLeftOf="parent"/> app:layout_constraintLeft_toLeftOf="parent"/>
...@@ -132,7 +133,8 @@ ...@@ -132,7 +133,8 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
android:background="@color/gray_huanggai"></View> android:background="@color/gray_huanggai"
app:layout_constraintTop_toBottomOf="@+id/btn_add"></View>
<TextView <TextView
android:id="@+id/btn_group" android:id="@+id/btn_group"
...@@ -147,16 +149,19 @@ ...@@ -147,16 +149,19 @@
app:layout_constraintTop_toBottomOf="@+id/btn_add"/> app:layout_constraintTop_toBottomOf="@+id/btn_add"/>
<View <View
android:id="@+id/vw"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width" android:layout_height="@dimen/all_line_width"
android:background="@color/gray_huanggai"></View> android:background="@color/gray_huanggai"
app:layout_constraintTop_toBottomOf="@+id/btn_group"></View>
<LinearLayout <LinearLayout
android:id="@+id/cl_bottom" android:id="@+id/cl_bottom"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:background="@color/white"
android:orientation="vertical" android:orientation="vertical"
android:padding="@dimen/all_margin_big" android:padding="@dimen/all_padding"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
...@@ -196,6 +201,8 @@ ...@@ -196,6 +201,8 @@
android:textSize="@dimen/all_text_size_big"/> android:textSize="@dimen/all_text_size_big"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</android.support.constraint.ConstraintLayout> </android.support.constraint.ConstraintLayout>
</layout> </layout>
\ No newline at end of file
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
android:background="?attr/actionBarItemBackground" android:background="?attr/actionBarItemBackground"
android:contentDescription="@string/all_go_back" android:contentDescription="@string/all_go_back"
android:gravity="center" android:gravity="center"
android:onClick="@{OnClickListener}"
android:padding="@dimen/all_margin" android:padding="@dimen/all_margin"
android:src="@mipmap/back_black" android:src="@mipmap/back_black"
app:layout_constraintLeft_toLeftOf="parent"/> app:layout_constraintLeft_toLeftOf="parent"/>
...@@ -66,6 +67,7 @@ ...@@ -66,6 +67,7 @@
android:imeOptions="actionSearch" android:imeOptions="actionSearch"
android:inputType="text" android:inputType="text"
android:labelFor="@+id/et_search" android:labelFor="@+id/et_search"
android:saveEnabled="false"
android:textColor="@color/black_likui" android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai" android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size"/> android:textSize="@dimen/all_text_size"/>
......
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
android:background="?attr/actionBarItemBackground" android:background="?attr/actionBarItemBackground"
android:contentDescription="@string/all_go_back" android:contentDescription="@string/all_go_back"
android:gravity="center" android:gravity="center"
android:onClick="@{OnClickListener}"
android:padding="@dimen/all_margin" android:padding="@dimen/all_margin"
android:src="@mipmap/back_black" android:src="@mipmap/back_black"
app:layout_constraintLeft_toLeftOf="parent"/> app:layout_constraintLeft_toLeftOf="parent"/>
...@@ -60,11 +61,12 @@ ...@@ -60,11 +61,12 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_marginEnd="@dimen/all_spacing" android:layout_marginEnd="@dimen/all_spacing"
android:layout_weight="1" android:layout_weight="1"
android:focusable="true"
android:hint="@string/store_search_hint" android:hint="@string/store_search_hint"
android:imeOptions="actionSearch" android:imeOptions="actionSearch"
android:inputType="text" android:inputType="text"
android:focusable="true"
android:labelFor="@+id/et_search" android:labelFor="@+id/et_search"
android:saveEnabled="false"
android:textColor="@color/black_likui" android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai" android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size"/> android:textSize="@dimen/all_text_size"/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment