Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
doublescreen-back
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pengguangpu
doublescreen-back
Commits
b250f27d
Commit
b250f27d
authored
Feb 27, 2020
by
pengguangpu
Browse files
Options
Browse Files
Download
Plain Diff
合并远程代码;本地支付结果页添加对打印小票配置的判断;
parents
a9610d6d
417f9ac4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
152 additions
and
72 deletions
+152
-72
app.json
app.json
+2
-2
actioncmd.js
const/actioncmd.js
+3
-0
index.acss
pages/index/index.acss
+17
-0
index.axml
pages/index/index.axml
+60
-0
index.js
pages/index/index.js
+47
-5
landscan.axml
pages/landscan/landscan.axml
+23
-65
No files found.
app.json
View file @
b250f27d
...
...
@@ -5,9 +5,9 @@
"pages/payresult/payresult"
,
"pages/printlastorder/printlastorder"
,
"pages/home/home"
,
"pages/landscan/landscan"
,
"pages/poster/poster"
,
"pages/waitoperate/waitoperate"
,
"pages/landscan/landscan"
"pages/waitoperate/waitoperate"
],
"window"
:
{
"defaultTitle"
:
""
,
...
...
const/actioncmd.js
View file @
b250f27d
...
...
@@ -67,6 +67,7 @@ export const ACTION_SYSTEM_SETTING = "ACTION_SYSTEM_SETTING";
//结算页面回到扫商品页面
export
const
ACTION_BALANCE_BACK_GOODS
=
"ACTION_BALANCE_BACK_GOODS"
;
//日结打印
export
const
ACTION_DAY_CHECK
=
"ACTION_DAY_CHECK"
;
...
...
@@ -79,6 +80,8 @@ export const ACTION_VERIFY_SUCCESS = "ACTION_VERIFY_SUCCESS";
//核验失败
export
const
ACTION_VERIFY_FAILED
=
"ACTION_VERIFY_FAILED"
;
//提货
export
const
ACTION_PICK_UP_GOODS
=
"ACTION_PICK_UP_GOODS"
;
const
FLOW_IDLE
=
"idle"
;
const
FLOW_COLLECTIONS
=
"collections"
;
//收款
...
...
pages/index/index.acss
View file @
b250f27d
...
...
@@ -305,6 +305,16 @@
justify-content: space-between;
}
/* 提货成功 */
.pick-goods-success-container{
height: 100%;
width: 45%;
background: white;
display: flex;
flex-direction: column;
align-items: center
}
/* 空购物车 */
.shopcart-list-empty {
...
...
@@ -817,6 +827,13 @@
margin-left: 18rpx;
}
/* 提货 商品已交付*/
.pick-goods-success {
width: 200rpx;
height: 60rpx;
margin-top: 50rpx;
}
/* 兑换券失败描述 */
.scan-coupon-text-fail-desr {
...
...
pages/index/index.axml
View file @
b250f27d
...
...
@@ -110,6 +110,66 @@
</view>
</view>
</view>
<!-- 提货码 -->
<view class="page-coupon" a:if="{{pickGoodsState != 0}}">
<view class="coupon-top">
<view class="coupon-back-container" onTap="pickGoodsClose" a:if="{{pickGoodsState == 1}}">
<image class="coupon-back-icon" mode="aspectFit" src="/images/icon_back.png"/>
<text class="coupon-back-text">返回</text>
</view>
<view class="coupon-title" a:if="{{pickGoodsState == 1}}">提货</view>
<view></view>
</view>
<!-- 等待扫描 -->
<view class="coupon-bottom" a:if="{{pickGoodsState == 1}}">
<text class="scan-coupon-text">提示顾客扫描提货码…</text>
<image class="scan-coupon-guide" mode="aspectFit" src="/images/scan_guide.png"/>
<button class="cancel-use-coupon" size="default" type="ghost" onTap="pickGoodsClose">关闭</button>
</view>
<!-- 提货中 -->
<view class="coupon-bottom" a:if="{{pickGoodsState == 2}}">
<text class="scan-coupon-text">正在识别提货码…</text>
<image class="scan-coupon-guide" mode="aspectFit" src="/images/scan_guide.png"/>
</view>
<!-- 提货成功 -->
<view class="land-scan-boottom" a:if="{{pickGoodsState == 3}}">
<scroll-view class="shopcart-list" scroll-y="{{true}}" a:if="{{pickGoods.length > 0}}">
<view class="shopcart-cart-top-blank">
</view>
<block a:for="{{pickGoods}}">
<view class="scan-list-bg">
<view class="good-top">
<view class="good-name">
{{item.name}}
</view>
</view>
<view class="good-bottom">
<view class="good-price">¥{{item.price}}</view>
<view class="good-operat">
<text class="good-num">{{item.quantity}}</text>
</view>
</view>
</view>
</block>
</scroll-view>
<view class="pick-goods-success-container">
<image class="scan-coupon-fail" mode="aspectFit" src="/images/icon_success.png"/>
<text class="scan-coupon-text-fail">提货码已识别</text>
<text class="scan-coupon-text-fail-desr">请根据商品列表\n提供商品给顾客</text>
<button class="pick-goods-success" type="primary" size="default" onTap="pickGoodsClose">商品已交付</button>
</view>
</view>
<!-- 提货失败 -->
<view class="coupon-bottom-fail" a:if="{{pickGoodsState == 4}}">
<image class="scan-coupon-fail" mode="aspectFit" src="/images/icon_failed.png"/>
<text class="scan-coupon-text-fail">提货失败</text>
<text class="scan-coupon-text-fail-desr">提货失败!无效的提货码</text>
<view class="failure-operation">
<button class="close-use-coupon" type="ghost" size="default" onTap="pickGoodsClose">关闭</button>
<button class="again-use-coupon" type="primary" size="default" onTap="onHomePickUpGoodsClicked">重新兑换</button>
</view>
</view>
</view>
</view>
<!--扫码页-->
<view hidden="{{!pageShow['landscan']}}">
...
...
pages/index/index.js
View file @
b250f27d
...
...
@@ -8,7 +8,7 @@ import {
ACTION_REFUND
,
ACTION_REFUND_SUCCESS
,
ACTION_REFUND_FAILED
,
ACTION_PRINT_LAST_ORDER
,
ACTION_GET_CUR_AD
,
ACTION_SEND_SEL_AD
,
ACTION_SYSTEM_SETTING
,
ACTION_BALANCE_BACK_GOODS
,
ACTION_DAY_CHECK
,
ACTION_VERIFY
,
ACTION_VERIFY_SUCCESS
,
ACTION_VERIFY_FAILED
,
ACTION_VERIFY
,
ACTION_VERIFY_SUCCESS
,
ACTION_VERIFY_FAILED
,
ACTION_PICK_UP_GOODS
}
from
'../../const/actioncmd'
import
{
FLOW_IDLE
,
FLOW_COLLECTIONS
,
FLOW_REFUND
,
FLOW_DIRECT_PAYMENT
,
FLOW_VERIFY
}
from
'../../const/actioncmd'
...
...
@@ -31,7 +31,7 @@ Page({
"appsetting"
:
false
,
},
// 前屏是否完成登录
isFrontScreenLoginOK
:
tru
e
,
isFrontScreenLoginOK
:
fals
e
,
flowType
:
""
,
//流程类型:用于区分易混淆的流程,以及共同界面使用时用该标识位作为区分
/**账号信息 */
...
...
@@ -54,6 +54,11 @@ Page({
payResultPrintSuccessHint
:
"提示顾客带好小票"
,
/**商品扫码页相关参数 */
//提货 0关闭 提货弹窗 1等待扫描提货码 2.提货码录入中 3.提货码录入成功 4.提货码录入失败
pickGoodsState
:
0
,
pickGoodsMsg
:
"录入失败!无效的提货码"
,
pickGoods
:
[],
//优惠券 0关闭 录入券弹窗 1等待录入 2.录入中 3.录入成功 4.录入失败
discCouponState
:
0
,
discCouponMsg
:
"录入失败!无效的优惠券码"
,
...
...
@@ -156,7 +161,7 @@ Page({
onLoad
(
query
)
{
// 页面加载
console
.
info
(
`Page onLoad with query:
${
JSON
.
stringify
(
query
)}
`
);
},
onReady
()
{
// 页面加载完成
...
...
@@ -391,6 +396,10 @@ Page({
operateReDo
:
"重新扫描"
,
});
context
.
goPage
(
'operateresult'
);
}
else
if
(
res
.
action
==
ACTION_PICK_UP_GOODS
){
//提货
context
.
setData
({
pickGoods
:
res
.
data
.
pickGoods
,
pickGoodsState
:
res
.
data
.
pickGoodsState
})
}
}
});
...
...
@@ -563,8 +572,22 @@ Page({
* 提货
*/
onHomePickUpGoodsClicked
()
{
},
let
context
=
this
;
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
frontScreenAppId
,
data
:
{
action
:
ACTION_PICK_UP_GOODS
,
data
:
1
},
success
:
(
sres
)
=>
{
context
.
setData
({
pickGoodsState
:
1
})
console
.
log
(
"提货通知前屏 成功 ===》"
+
JSON
.
stringify
(
sres
));
},
fail
:
(
fres
)
=>
{
console
.
log
(
"提货通知前屏 失败 ===》 "
+
JSON
.
stringify
(
fres
));
}
})
},
/**日结 */
onHomeDayCheckClicked
()
{
...
...
@@ -680,6 +703,7 @@ Page({
discCouponState
:
0
,
discCouponMsg
:
""
,
discCouponPrice
:
0
,
})
var
commonRequest
=
{
...
...
@@ -1024,6 +1048,24 @@ Page({
}
},
//提货关闭
pickGoodsClose
(
e
)
{
let
context
=
this
;
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
frontScreenAppId
,
data
:
{
action
:
ACTION_PICK_UP_GOODS
,
data
:
0
},
success
:
(
sres
)
=>
{
context
.
setData
({
pickGoodsState
:
0
})
console
.
log
(
"关闭提货通知前屏 成功 ===》"
+
JSON
.
stringify
(
sres
));
},
fail
:
(
fres
)
=>
{
console
.
log
(
"关闭提货通知前屏 失败 ===》 "
+
JSON
.
stringify
(
fres
));
}
})
},
//兑换券界面关闭
convertCouponClose
(
e
)
{
this
.
setData
({
convertCouponState
:
0
})
...
...
pages/landscan/landscan.axml
View file @
b250f27d
<!-- 扫商品页面 -->
<view class="{{scene != 0 ? 'pfilter' : 'pageland' }}">
<view class="land-scan-top">
<button class="land-scan-top-member-login" size="default" type="ghost">会员登陆</button>
<text class="cashier-text">收银</text>
<view>
<image class="go-home-icon" mode="aspectFit" src="/images/icon_home.png"/>
<text class="go-home-text">首页</text>
<view class="land-scan-boottom">
<!-- 购物车有数据 -->
<scroll-view class="shopcart-list" scroll-y="{{true}}" a:if="{{goods.length > 0}}">
<view class="shopcart-cart-top-blank">
</view>
</view>
<view class="land-scan-boottom">
<!-- 空购物车 -->
<view class="shopcart-list-empty" hidden="{{goods.length > 0}}">
<view class="empty-remind-text">请扫描商品条码添加商品</view>
<image class="empty-remind-icon" mode="aspectFit" src="/images/scan_good_guide.png"/>
</view>
<!-- 购物车有数据 -->
<scroll-view class="shopcart-list" scroll-y="{{true}}" a:if="{{goods.length > 0}}" >
<view class="shopcart-cart-top-blank">
</view>
<block a:for="{{goods}}">
<view class="scan-list-bg" >
<view class="good-top">
<view class="good-name">
<block a:for="{{goods}}">
<view class="scan-list-bg">
<view class="good-top">
<view class="good-name">
{{item.name}}
</view>
<image id="{{item.barcode}}" class="good-del" mode="aspectFit" src="/images/harf_delete.png" catchTap="deleteGood" />
</view>
<view class="good-bottom">
<view class="good-price">¥{{item.price}}</view>
<view class="good-operat">
<image id="{{item.barcode}}" class="good-decrease" mode="scaleToFill" src="/images/good_decrease.png" catchTap="decreaseGood"/>
<text class="good-num">{{item.quantity}}</text>
<image id="{{item.barcode}}" class="good-increase" mode="scaleToFill" src="/images/good_increase.png" catchTap="increaseGood"/>
</view>
<image id="{{item.barcode}}" class="good-del" mode="aspectFit" src="/images/harf_delete.png" catchTap="deleteGood" />
</view>
<view class="good-bottom">
<view class="good-price">¥{{item.price}}</view>
<view class="good-operat">
<text class="good-num">{{item.quantity}}</text>
</view>
</view>
</block>
</scroll-view>
<view class="more-operating">
<view class="operating-top">
<image class="operat-icon" mode="aspectFit" src="/images/manual_barcode.png" catchTap="manualBarcode"/>
<image class="operat-icon" mode="aspectFit" src="/images/use_coupon.png" catchTap="useCoupon"/>
<image class="operat-icon" mode="aspectFit" src="/images/clear_shop_list.png" catchTap="clearGood"/>
</view>
<view class="operating-bottom">
<text class="total-num">共{{totalQuantity}}件商品,合计金额</text>
<text class="pay-price">¥{{totalPrice}}</text>
<button class="go-pay" size="default" type="primary" onTap="goPay">收款</button>
</view>
</view>
</view>
</view>
<!-- 扫描优惠券 -->
<view class="page-coupon" a:if="{{couponUseing}}" >
<view class="coupon-top">
<view class="coupon-back-container" onTap="couponBack">
<image class="coupon-back-icon" mode="aspectFit" src="/images/icon_back.png"/>
<text class="coupon-back-text">返回</text>
</view>
<view class="coupon-title">优惠券</view>
<view></view>
</view>
<view class="coupon-bottom">
<text class="scan-coupon-text">等待顾客扫描优惠券码…</text>
<image class="scan-coupon-guide" mode="aspectFit" src="/images/scan_guide.png"/>
<button class="cancel-use-coupon" size="default" type="ghost" onTap="couponBack">取消</button>
</block>
</scroll-view>
<view class="more-operating">
<image class="scan-coupon-fail" mode="aspectFit" src="/images/icon_success.png"/>
<text class="scan-coupon-text-fail">提货码已识别</text>
<text class="scan-coupon-text-fail-desr">请根据商品列表提供商品给顾客</text>
<button class="sure-use-coupon" type="primary" size="default" onTap="convertCouponClose">确定</button>
</view>
</view>
<!-- 键盘 -->
<land-keybord scene="{{scene}}" onKeyBordFinished="onKeyBordFinished" onKeyBordClose="onKeyBordClose">
</land-keybord>
\ No newline at end of file
</view>
\ No newline at end of file
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