Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TangKuPos
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王海
TangKuPos
Commits
ed8b2c81
Commit
ed8b2c81
authored
Jan 18, 2018
by
zhang_z
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
加大数量变化按钮;
打开支付宝支付;
parent
3f8eae3c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
46 deletions
+47
-46
app/src/main/java/com/xingdata/zzdpos/ui/manage/sssku/fragment/AddFragment.java
...xingdata/zzdpos/ui/manage/sssku/fragment/AddFragment.java
+1
-0
app/src/main/java/com/xingdata/zzdpos/ui/settle/SettleActivity.java
...in/java/com/xingdata/zzdpos/ui/settle/SettleActivity.java
+5
-1
app/src/main/java/com/xingdata/zzdpos/ui/settle/SettlePresenter.java
...n/java/com/xingdata/zzdpos/ui/settle/SettlePresenter.java
+34
-41
app/src/main/res/layout/item_store_sku.xml
app/src/main/res/layout/item_store_sku.xml
+7
-4
No files found.
app/src/main/java/com/xingdata/zzdpos/ui/manage/sssku/fragment/AddFragment.java
View file @
ed8b2c81
...
...
@@ -34,6 +34,7 @@ public class AddFragment extends BaseFragment<SsskuPresenter, FragmentSsskuAddBi
mViewBinding
.
etBarcode
.
setOnEditorActionListener
((
textView
,
i
,
keyEvent
)
->
{
if
((
i
==
EditorInfo
.
IME_ACTION_SEARCH
||
i
==
EditorInfo
.
IME_ACTION_UNSPECIFIED
)
&&
!
StringUtils
.
isEmpty
(
textView
.
getText
()))
{
KeyboardUtils
.
hideSoftInput
(
textView
);
this
.
pop
();
mPresenter
.
clickCheck
(
mViewBinding
.
etBarcode
.
getText
().
toString
());
}
return
false
;
...
...
app/src/main/java/com/xingdata/zzdpos/ui/settle/SettleActivity.java
View file @
ed8b2c81
...
...
@@ -138,7 +138,11 @@ public class SettleActivity extends BaseActivity<SettlePresenter, ActivitySettle
break
;
case
C
.
PAY_CHANNEL
.
BANK
:
case
C
.
PAY_CHANNEL
.
ALI
:
showMsg
(
"暂时无法使用"
);
mScanFragment
.
setOnScanCompletedListener
(
barcode
->
{
this
.
pop
();
mPresenter
.
payInAli
(
barcode
);
});
this
.
start
(
mScanFragment
);
break
;
case
C
.
PAY_CHANNEL
.
WECHAT
:
mScanFragment
.
setOnScanCompletedListener
(
barcode
->
{
...
...
app/src/main/java/com/xingdata/zzdpos/ui/settle/SettlePresenter.java
View file @
ed8b2c81
...
...
@@ -227,55 +227,48 @@ public class SettlePresenter extends SettleContract.Presenter {
public
void
payInAli
(
String
payCode
)
{
mView
.
showLoadingDialog
();
commitOrder
()
.
flatMap
(
orderNo
->
{
return
JniFactory
.
Settle
.
pay
(
C
.
PAY_CHANNEL
.
ALI
,
payCode
,
mSaleorder
.
getOrderPayAmt
(),
orderNo
);
})
.
flatMap
(
orderNo
->
JniFactory
.
Settle
.
pay
(
C
.
PAY_CHANNEL
.
ALI
,
payCode
,
mSaleorder
.
getOrderPayAmt
(),
orderNo
))
.
doFinally
(()
->
mView
.
dismissLoadingDialog
())
.
subscribe
(
response
->
{
com
.
xingdata
.
zzdpos
.
api
.
Pay
.
Response
r1
=
JSON
.
parseObject
(
response
.
replace
(
"\\"
,
""
),
com
.
xingdata
.
zzdpos
.
api
.
Pay
.
Response
.
class
);
switch
(
r1
.
getResponseCode
())
{
case
"0000"
:
subscribePay
(
commitOrder
().
flatMap
(
orderNo
->
ApiFactory
.
Saleorder
.
addOrderPayMis
(
mSaleorder
.
pay
(
orderNo
,
C
.
PAY_CHANNEL
.
ALI
)).
doFinally
(()
->
mView
.
dismissLoadingDialog
())));
break
;
case
"0098"
:
mView
.
showPayingDialog
(
C
.
PAY_CHANNEL
.
ALI
,
r1
);
break
;
default
:
mView
.
showPayFailFragment
(
null
,
mSaleorder
);
break
;
}
},
throwable
->
{
mView
.
showPayFailFragment
(
throwable
,
mSaleorder
);
});
// .flatMap(response -> {
// return ApiFactory.Saleorder.addOrderPayMis(mSaleorder.pay(response.getOrderNo(), C.PAY_CHANNEL.ALI));
// });
.
subscribe
(
response
->
{
com
.
xingdata
.
zzdpos
.
api
.
Pay
.
Response
r1
=
JSON
.
parseObject
(
response
.
replace
(
"\\"
,
""
),
com
.
xingdata
.
zzdpos
.
api
.
Pay
.
Response
.
class
);
switch
(
r1
.
getResponseCode
())
{
case
"0000"
:
subscribePay
(
commitOrder
().
flatMap
(
orderNo
->
ApiFactory
.
Saleorder
.
addOrderPayMis
(
mSaleorder
.
pay
(
orderNo
,
C
.
PAY_CHANNEL
.
ALI
)).
doFinally
(()
->
mView
.
dismissLoadingDialog
())));
break
;
case
"0098"
:
mView
.
showPayingDialog
(
C
.
PAY_CHANNEL
.
ALI
,
r1
);
break
;
default
:
mView
.
showPayFailFragment
(
null
,
mSaleorder
);
break
;
}
},
throwable
->
mView
.
showPayFailFragment
(
throwable
,
mSaleorder
));
}
@Override
public
void
payInWechat
(
String
payCode
)
{
mView
.
showLoadingDialog
();
commitOrder
()
.
flatMap
(
orderNo
->
{
return
JniFactory
.
Settle
.
pay
(
C
.
PAY_CHANNEL
.
WECHAT
,
payCode
,
mSaleorder
.
getOrderPayAmt
(),
orderNo
);
})
.
flatMap
(
orderNo
->
JniFactory
.
Settle
.
pay
(
C
.
PAY_CHANNEL
.
WECHAT
,
payCode
,
mSaleorder
.
getOrderPayAmt
(),
orderNo
))
.
doFinally
(()
->
mView
.
dismissLoadingDialog
())
.
subscribe
(
response
->
{
com
.
xingdata
.
zzdpos
.
api
.
Pay
.
Response
r1
=
JSON
.
parseObject
(
response
.
replace
(
"\\"
,
""
),
com
.
xingdata
.
zzdpos
.
api
.
Pay
.
Response
.
class
);
switch
(
r1
.
getResponseCode
())
{
case
"0000"
:
subscribePay
(
commitOrder
().
flatMap
(
orderNo
->
ApiFactory
.
Saleorder
.
addOrderPayMis
(
mSaleorder
.
pay
(
orderNo
,
C
.
PAY_CHANNEL
.
WECHAT
)).
doFinally
(()
->
mView
.
dismissLoadingDialog
())));
break
;
case
"0098"
:
mView
.
showPayingDialog
(
C
.
PAY_CHANNEL
.
WECHAT
,
r1
);
break
;
default
:
mView
.
showPayFailFragment
(
null
,
mSaleorder
);
break
;
}
},
throwable
->
{
mView
.
showPayFailFragment
(
throwable
,
mSaleorder
);
}
);
.
subscribe
(
response
->
{
com
.
xingdata
.
zzdpos
.
api
.
Pay
.
Response
r1
=
JSON
.
parseObject
(
response
.
replace
(
"\\"
,
""
),
com
.
xingdata
.
zzdpos
.
api
.
Pay
.
Response
.
class
);
switch
(
r1
.
getResponseCode
())
{
case
"0000"
:
subscribePay
(
commitOrder
().
flatMap
(
orderNo
->
ApiFactory
.
Saleorder
.
addOrderPayMis
(
mSaleorder
.
pay
(
orderNo
,
C
.
PAY_CHANNEL
.
WECHAT
)).
doFinally
(()
->
mView
.
dismissLoadingDialog
())))
;
break
;
case
"0098"
:
mView
.
showPayingDialog
(
C
.
PAY_CHANNEL
.
WECHAT
,
r1
)
;
break
;
default
:
mView
.
showPayFailFragment
(
null
,
mSaleorder
)
;
break
;
}
},
throwable
->
mView
.
showPayFailFragment
(
throwable
,
mSaleorder
)
);
}
@Override
...
...
app/src/main/res/layout/item_store_sku.xml
View file @
ed8b2c81
...
...
@@ -39,10 +39,11 @@
app:layout_constraintRight_toRightOf=
"parent"
/>
<LinearLayout
android:id=
"@+id/ll_price"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"@dimen/all_spacing"
app:layout_constraintBottom_toBottomOf=
"@id/
ll_count
"
app:layout_constraintBottom_toBottomOf=
"@id/
iv_pic
"
app:layout_constraintLeft_toLeftOf=
"@id/tv_name"
>
<TextView
...
...
@@ -69,8 +70,8 @@
android:layout_marginTop=
"@dimen/all_spacing"
android:animateLayoutChanges=
"true"
android:gravity=
"center"
app:layout_constraint
Bottom_toBottomOf=
"@id/iv_pic
"
app:layout_constraint
Right_toRight
Of=
"@id/tv_name"
>
app:layout_constraint
Right_toRightOf=
"@id/tv_name
"
app:layout_constraint
Top_toBottom
Of=
"@id/tv_name"
>
<ImageView
android:id=
"@+id/iv_reduce"
...
...
@@ -78,8 +79,9 @@
android:layout_height=
"wrap_content"
android:contentDescription=
"@string/store_reduce"
android:foreground=
"?android:attr/actionBarItemBackground"
android:padding=
"@dimen/all_spacing"
android:src=
"@mipmap/but_reduce"
android:visibility=
"
gon
e"
/>
android:visibility=
"
visibl
e"
/>
<TextView
android:id=
"@+id/tv_count"
...
...
@@ -98,6 +100,7 @@
android:layout_height=
"wrap_content"
android:contentDescription=
"@string/store_increase"
android:foreground=
"?android:attr/actionBarItemBackground"
android:padding=
"@dimen/all_spacing"
android:src=
"@mipmap/but_increase02"
/>
</LinearLayout>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment