Commit db597861 authored by 王海's avatar 王海

组合商品

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