Commit 2f7add72 authored by 陈前's avatar 陈前

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	app/src/main/AndroidManifest.xml
parents 5526a8d8 c371f1a8
......@@ -110,6 +110,10 @@
android:name=".ui.manage.replenishment.ReplenishmentActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".ui.manage.sssku.SsskuActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
android:windowSoftInputMode="adjustUnspecified|stateHidden" />
<activity
android:name=".ui.manage.inventory.InventoryActivity"
android:configChanges="keyboard|orientation|screenSize|keyboardHidden"
......
......@@ -14,11 +14,8 @@ import com.xingdata.zzdpos.databinding.ActivityMarketingMenuBinding;
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.marketing.integral.IntegralActivity;
import com.xingdata.zzdpos.ui.marketing.marketingMenu.MarketingMenuActivity;
import com.xingdata.zzdpos.ui.manage.sssku.SsskuActivity;
import com.xingdata.zzdpos.ui.marketing.marketingMenu.adapter.MarketingMenuAdapter;
import com.xingdata.zzdpos.ui.marketing.ms.MsActivity;
import com.xingdata.zzdpos.ui.marketing.ticket.ReturnTicketActivity;
import com.xingdata.zzdpos.util.OnClickListener;
import java.util.ArrayList;
......@@ -64,7 +61,7 @@ public class ManageMenuActivity extends AppCompatActivity {
}
break;
case C.MENU.MENU_MANAGER_GOODS: {
ActivityUtils.startActivity(ManageMenuActivity.this, SsskuActivity.class);
}
break;
case C.MENU.MENU_MANAGER_BALE: {
......
package com.xingdata.zzdpos.ui.manage.sssku;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseActivity;
import com.xingdata.zzdpos.databinding.ActivitySsskuBinding;
import com.xingdata.zzdpos.ui.manage.sssku.fragment.ManagerFragment;
public class SsskuActivity extends BaseActivity<SsskuPresenter, ActivitySsskuBinding> implements SsskuContract.View {
private ManagerFragment mManagerFragment = new ManagerFragment();
@Override
public int getLayoutId() {
return R.layout.activity_sssku;
}
@Override
public void initView() {
this.loadRootFragment(R.id.f_sssku, mManagerFragment);
}
}
package com.xingdata.zzdpos.ui.manage.sssku;
import com.xingdata.zzdpos.base.BasePresenter;
import com.xingdata.zzdpos.base.BaseView;
public interface SsskuContract {
interface View extends BaseView {
}
abstract class Presenter extends BasePresenter<View> {
}
}
package com.xingdata.zzdpos.ui.manage.sssku;
public class SsskuPresenter extends SsskuContract.Presenter {
@Override
public void onAttached() {
}
}
package com.xingdata.zzdpos.ui.manage.sssku.adapter;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseAdapter;
import com.xingdata.zzdpos.databinding.ItemStoreSkuBinding;
import com.xingdata.zzdpos.model.Saledetail;
import com.xingdata.zzdpos.model.Sssku;
import com.xingdata.zzdpos.ui.store.fragment.StoreFragment;
import com.xingdata.zzdpos.util.ConvertUtil;
import java.util.ArrayList;
import java.util.List;
public class SkuAdapter extends BaseAdapter<Sssku, ItemStoreSkuBinding> {
private List<Saledetail> mSaledetails;
public SkuAdapter() {
super(R.layout.item_store_sku, new ArrayList<>());
this.mSaledetails = new ArrayList<>();
}
private StoreFragment.OnCountChangeListener mOnCountChangeListener;
public void setSaledetails(List<Saledetail> saledetails) {
this.mSaledetails = saledetails;
}
@Override
protected void convert(ItemStoreSkuBinding mViewBinding, Sssku item) {
mViewBinding.ivPic.setImageURI(item.getSpuImg());
mViewBinding.tvName.setText(item.getSpuName());
mViewBinding.tvAmt.setText(ConvertUtil.fenToYuan(item.getSkuRetailPrice1()));
}
}
package com.xingdata.zzdpos.ui.manage.sssku.adapter;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseSelectedAdapter;
import com.xingdata.zzdpos.base.BaseViewHolder;
import com.xingdata.zzdpos.databinding.ItemSelectorBinding;
import com.xingdata.zzdpos.model.Sskugrp;
import java.util.ArrayList;
public class SkugrpAdapter extends BaseSelectedAdapter<Sskugrp, ItemSelectorBinding> {
public SkugrpAdapter() {
super(R.layout.item_selector, new ArrayList<>(), false);
}
@Override
protected void convert(BaseViewHolder helper, ItemSelectorBinding mViewBinding, Sskugrp item) {
mViewBinding.setSelected(getSelectedPosition() == helper.getAdapterPosition());
mViewBinding.tvName.getPaint().setFakeBoldText(getSelectedPosition() == helper.getAdapterPosition());
mViewBinding.tvName.setText(item.getSkuGrpName());
}
}
package com.xingdata.zzdpos.ui.manage.sssku.fragment;
import com.xingdata.zzdpos.R;
import com.xingdata.zzdpos.base.BaseFragment;
import com.xingdata.zzdpos.databinding.FragmentSsskuManagerBinding;
import com.xingdata.zzdpos.ui.manage.sssku.SsskuPresenter;
public class ManagerFragment extends BaseFragment<SsskuPresenter, FragmentSsskuManagerBinding> {
@Override
public int getLayoutId() {
return R.layout.fragment_sssku_manager;
}
@Override
public void initView() {
mViewBinding.llAdd.setOnClickListener(view -> {
});
mViewBinding.tvReplenish.setOnClickListener(view -> {
});
}
}
<?xml version="1.0" encoding="utf-8"?>
<layout 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">
<data>
<variable
name="titleMode"
type="int" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao">
<ImageButton
android:id="@+id/btn_back"
android:layout_width="?attr/actionBarSize"
android:layout_height="match_parent"
android:background="?attr/actionBarItemBackground"
android:contentDescription="@string/all_go_back"
android:gravity="center"
android:padding="@dimen/all_margin"
android:src="@mipmap/back_black"
app:layout_constraintLeft_toLeftOf="parent" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/all_margin"
android:visibility="@{titleMode>1?0:8}"
app:layout_constraintBottom_toTopOf="parent"
app:layout_constraintLeft_toRightOf="@id/btn_back"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="parent">
<EditText
android:id="@+id/et_search"
style="@style/searchBarEditor"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:inputType="number"
android:labelFor="@+id/et_search"
android:textColor="@color/black_likui"
android:textColorHint="@color/gray_huanggai"
android:textSize="@dimen/all_text_size" />
</LinearLayout>
<TextView
android:id="@+id/tv_title"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/payment_title"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_sub_title_size"
android:visibility="@{titleMode>1?8:0}"
app:layout_constraintLeft_toRightOf="parent"
app:layout_constraintRight_toLeftOf="parent" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gray_huanggai"
app:layout_constraintBottom_toBottomOf="parent" />
</android.support.constraint.ConstraintLayout>
<FrameLayout
android:id="@+id/f_sssku"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
</layout>
\ No newline at end of file
......@@ -7,6 +7,50 @@
android:background="@color/gray_zhouyu"
android:orientation="vertical">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/white_caocao"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginEnd="@dimen/all_margin"
android:layout_marginStart="@dimen/all_margin"
android:background="@drawable/shape_gray_r1"
android:gravity="center_vertical"
android:padding="@dimen/all_spacing">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/shape_red_r1"
android:paddingBottom="@dimen/all_shape_radius"
android:paddingEnd="@dimen/all_spacing"
android:paddingStart="@dimen/all_spacing"
android:paddingTop="@dimen/all_shape_radius"
android:text="@string/ms_user_title"
android:textColor="@color/white_caocao" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_spacing"
android:layout_weight="1"
android:singleLine="true"
android:text="@string/ms_user_hint"
android:textColor="@color/black_baozheng" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_gravity="bottom"
android:background="@color/gray_kongming" />
</FrameLayout>
<LinearLayout
android:id="@+id/ll_add"
......
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/gray_zhouyu"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingBottom="@dimen/all_margin"
android:paddingTop="@dimen/all_margin">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="共"
android:textColor="@color/black_baozheng" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/all_spacing"
android:layout_marginStart="@dimen/all_spacing"
android:text="160"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_title_size" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="件"
android:textColor="@color/black_baozheng" />
</LinearLayout>
<View
android:layout_width="@dimen/view_line_L2"
android:layout_height="match_parent"
android:background="@color/golden_yuji" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:text="今日需补货"
android:textColor="@color/black_baozheng" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_spacing"
android:text="6"
android:textColor="@color/red_guanyu"
android:textSize="@dimen/all_title_size" />
</LinearLayout>
<TextView
android:id="@+id/tv_replenish"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginEnd="@dimen/all_margin"
android:background="@drawable/shape_red_round_rectangle_more_round"
android:foreground="?android:attr/actionBarItemBackground"
android:gravity="center"
android:paddingBottom="@dimen/all_spacing"
android:paddingEnd="@dimen/all_margin_big"
android:paddingStart="@dimen/all_margin_big"
android:paddingTop="@dimen/all_spacing"
android:text="一键补货"
android:textColor="@color/white_caocao" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gray_huanggai" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/gray_huanggai" />
<LinearLayout
android:id="@+id/ll_add"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:gravity="center"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="?attr/actionBarSize"
android:drawablePadding="@dimen/all_spacing"
android:drawableStart="@mipmap/add_bg"
android:gravity="center"
android:text="@string/ms_add"
android:textColor="@color/red_guanyu"
android:textSize="@dimen/all_sub_title_size" />
<View
android:layout_width="match_parent"
android:layout_height="@dimen/all_line_width"
android:background="@color/gray_kongming" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false">
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<android.support.v7.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</LinearLayout>
<android.support.v4.widget.SwipeRefreshLayout
android:id="@+id/srl_sku"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="3"
android:background="@color/white_caocao">
<android.support.v7.widget.RecyclerView
android:id="@+id/rl_sku"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</android.support.v4.widget.SwipeRefreshLayout>
</LinearLayout>
</LinearLayout>
</layout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="android.view.View" />
<variable
name="count"
type="int" />
</data>
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white_caocao"
android:foreground="?android:attr/selectableItemBackground"
android:paddingEnd="@dimen/all_margin"
android:paddingStart="@dimen/all_margin"
android:paddingTop="@dimen/all_margin">
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/iv_pic"
android:layout_width="80dp"
android:layout_height="80dp"
app:failureImage="@mipmap/icon_goods_default"
app:placeholderImage="@mipmap/icon_goods_default"
app:roundedCornerRadius="@dimen/all_shape_radius" />
<TextView
android:id="@+id/tv_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/all_margin"
android:lines="2"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size"
app:layout_constraintLeft_toRightOf="@id/iv_pic"
app:layout_constraintRight_toRightOf="parent" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/all_margin"
app:layout_constraintLeft_toLeftOf="@id/tv_name"
app:layout_constraintTop_toBottomOf="@id/tv_name">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/money_rmb"
android:textColor="@color/red_guanyu"
android:textSize="@dimen/all_caption_size"
android:textStyle="bold" />
<TextView
android:id="@+id/tv_amt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/red_guanyu"
android:textSize="@dimen/all_text_size"
android:textStyle="bold" />
</LinearLayout>
<View
android:layout_width="0dp"
android:layout_height="@dimen/all_line_width"
android:layout_marginTop="@dimen/all_margin"
android:background="@color/gray_kongming"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@id/iv_pic" />
</android.support.constraint.ConstraintLayout>
</layout>
......@@ -65,7 +65,7 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:text="@string/ms_editor_user"
android:text="@string/ms_editor_type_dis_hint"
android:textColor="@color/black_baozheng"
android:textSize="@dimen/all_text_size" />
......
......@@ -321,6 +321,8 @@
<!--营销计划-->
<string name="ms_title">营销计划</string>
<string name="ms_add">添加营销计划</string>
<string name="ms_user_title">旗舰</string>
<string name="ms_user_hint">营销计划功能限时免费使用 3 个月</string>
<string name="ms_count">共%s个营销计划</string>
<string name="ms_search_hint">请输入活动名称</string>
<string name="ms_empty_hint">没有搜到此计划\n请重新搜索,或点击添加按钮进行添加~</string>
......
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