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
d006f2dc
Commit
d006f2dc
authored
Feb 24, 2020
by
jiangjiantao
Browse files
Options
Browse Files
Download
Plain Diff
merge fixed
parents
69076a08
e195f375
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
479 additions
and
224 deletions
+479
-224
app.json
app.json
+1
-0
actioncmd.js
const/actioncmd.js
+2
-1
index.acss
pages/index/index.acss
+68
-0
index.axml
pages/index/index.axml
+185
-146
index.js
pages/index/index.js
+99
-77
printlastorder.acss
pages/printlastorder/printlastorder.acss
+65
-0
printlastorder.axml
pages/printlastorder/printlastorder.axml
+42
-0
printlastorder.js
pages/printlastorder/printlastorder.js
+14
-0
printlastorder.json
pages/printlastorder/printlastorder.json
+3
-0
No files found.
app.json
View file @
d006f2dc
{
{
"pages"
:
[
"pages"
:
[
"pages/index/index"
,
"pages/index/index"
,
"pages/printlastorder/printlastorder"
,
"pages/poster/poster"
,
"pages/poster/poster"
,
"pages/home/home"
,
"pages/home/home"
,
"pages/poster/poster"
,
"pages/poster/poster"
,
...
...
const/actioncmd.js
View file @
d006f2dc
...
@@ -49,7 +49,8 @@ export const ACTION_REFUND_SUCCESS = "ACTION_REFUND_SUCCESS";
...
@@ -49,7 +49,8 @@ export const ACTION_REFUND_SUCCESS = "ACTION_REFUND_SUCCESS";
//退款失败
//退款失败
export
const
ACTION_REFUND_FAILED
=
"ACTION_REFUND_FAILED"
;
export
const
ACTION_REFUND_FAILED
=
"ACTION_REFUND_FAILED"
;
//打印上一单
export
const
ACTION_PRINT_LAST_ORDER
=
"ACTION_PRINT_LAST_ORDER"
;
const
FLOW_IDLE
=
"idle"
;
const
FLOW_IDLE
=
"idle"
;
const
FLOW_COLLECTIONS
=
"collections"
;
const
FLOW_COLLECTIONS
=
"collections"
;
...
...
pages/index/index.acss
View file @
d006f2dc
...
@@ -852,3 +852,71 @@
...
@@ -852,3 +852,71 @@
width: 100%;
width: 100%;
height: auto;
height: auto;
}
}
/**打印上一单*/
.printLastOrderPage {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
position: absolute;
}
.topView {
position: absolute;
top: 0rpx;
width: 100%;
height: 60rpx;
background: #ffffff;
box-shadow: 0rpx 2rpx 7rpx 0rpx rgba(153, 153, 153, 0.16);
/* border: 2px solid red; */
}
.printLastOrderTitleText {
position: absolute;
line-height: 60rpx;
height: 100%;
font-size: 22rpx;
font-weight: bold;
text-align: center;
align-items: center;
width: 100%;
color: #333333;
align-content: center;
/* border: 2px solid red; */
}
.printLastOrderBackButton {
position: absolute;
height: 60rpx;
text-align: center;
align-items: center;
align-content: center;
font-size: 19rpx;
line-height: 60rpx;
/* border: 2px solid red; */
padding-left: 19rpx;
padding-right: 19rpx;
}
.printLastOrderBottomView {
height: 100%;
background: white;
width: 100%;
position: absolute;
/* display: flex;
flex-direction: column; */
/* border: 2px solid red; */
}
.printLastOrderPrintStatusHint {
color: #333333;
font-size: 26rpx;
margin: 0 auto;
width: 100%;
text-align: center;
font-weight: bold;
position: absolute;
top: 89rpx;
}
\ No newline at end of file
pages/index/index.axml
View file @
d006f2dc
<view>
<view>
<view class="{{scene != 0 ? 'homePageFilter' : 'homePage' }}" hidden="{{!pageShow['home']}}">
<view class="{{scene != 0 ? 'homePageFilter' : 'homePage' }}" hidden="{{!pageShow['home']}}">
<view class="homeTopView">
<view class="homeTopView">
<view class="store">
<view class="store">
<image mode="aspectFit" style="position:absolute;width:24rpx;height:21rpx;left: 19rpx;top:19rpx;" src="/images/icon_store.png"/>
<image mode="aspectFit" style="position:absolute;width:24rpx;height:21rpx;left: 19rpx;top:19rpx;" src="/images/icon_store.png"/>
<text style="position:absolute;font-size:19rpx;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:rgba(0,0,0,0.85);line-height:22rpx;left:55rpx;top:19rpx;">{{storeName}}</text>
<text style="position:absolute;font-size:19rpx;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:rgba(0,0,0,0.85);line-height:22rpx;left:55rpx;top:19rpx;">{{storeName}}</text>
</view>
<view style="position:absolute;font-size:22rpx;font-family:PingFangSC-Medium,PingFang SC;font-weight:500;color:rgba(51,51,51,1);line-height:22rpx;left:0rpx;top:19rpx;width:100%;text-align:center;">首页</view>
<view style="display:flex;flex-direction:row-reverse;position:absolute;right:19rpx;top:19rpx;width:auto;background:#ffffff;">
<view style="font-size:19rpx;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:rgba(51,51,51,1);line-height:22rpx;">退出</view>
<image mode="aspectFit" src="/images/icon_exit.png" style="position:relative;width:19rpx;height:19rpx;margin-right:8rpx;margin-top:1rpx;"/>
</view>
</view>
</view>
<view style="position:absolute;font-size:22rpx;font-family:PingFangSC-Medium,PingFang SC;font-weight:500;color:rgba(51,51,51,1);line-height:22rpx;left:0rpx;top:19rpx;width:100%;text-align:center;">首页</view>
<view class="homeBodyView" style="height:100%;">
<view style="display:flex;flex-direction:row-reverse;position:absolute;right:19rpx;top:19rpx;width:auto;background:#ffffff;">
<swiper indicator-dots="{{true}}">
<view style="font-size:19rpx;font-family:PingFangSC-Regular,PingFang SC;font-weight:400;color:rgba(51,51,51,1);line-height:22rpx;">退出</view>
<swiper-item>
<image mode="aspectFit" src="/images/icon_exit.png" style="position:relative;width:19rpx;height:19rpx;margin-right:8rpx;margin-top:1rpx;"/>
<view style="margin:0 auto;width:100%;height:352rpx;display:flex;flex-direction:column;">
</view>
<view style="margin:0 auto;width:698rpx;height:100%;display:flex; flex-direction: row;margin-top:30rpx;flex-wrap:wrap;align-content:flex-start;">
</view>
<view class="homeItemView" onTap="sendGoToCollections">
<view class="homeBodyView" style="height:100%;">
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_cashier.png"/>
<swiper indicator-dots="{{true}}">
<text class="homeItemText">收银</text>
<swiper-item>
</view>
<view style="margin:0 auto;width:100%;height:352rpx;display:flex;flex-direction:column;">
<view class="homeItemView" onTap="onHomeCashierImmediatelyClicked">
<view style="margin:0 auto;width:698rpx;height:100%;display:flex; flex-direction: row;margin-top:30rpx;flex-wrap:wrap;align-content:flex-start;">
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_cashier_immediately.png"/>
<view class="homeItemView" onTap="sendGoToCollections">
<text class="homeItemText">直接收款</text>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_cashier.png"/>
</view>
<text class="homeItemText">收银</text>
<view class="homeItemView" onTap="onHomeExchangeClicked">
</view>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_exchange.png"/>
<view class="homeItemView" onTap="onHomeCashierImmediatelyClicked">
<text class="homeItemText">兑换</text>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_cashier_immediately.png"/>
</view>
<text class="homeItemText">直接收款</text>
<view class="homeItemView" onTap="onHomePosterClicked">
</view>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_poster.png"/>
<view class="homeItemView" onTap="onHomeExchangeClicked">
<text class="homeItemText">海报</text>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_exchange.png"/>
</view>
<text class="homeItemText">兑换</text>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomeRefundClicked">
</view>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_refund.png"/>
<view class="homeItemView" onTap="onHomePosterClicked">
<text class="homeItemText">退款</text>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_poster.png"/>
</view>
<text class="homeItemText">海报</text>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomePrintLastOrderClicked">
</view>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_print_last_order.png"/>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomeRefundClicked">
<text class="homeItemText">打印上一单</text>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_refund.png"/>
</view>
<text class="homeItemText">退款</text>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomeVerifyClicked">
</view>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_verify.png"/>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomePrintLastOrderClicked">
<text class="homeItemText">核验</text>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_print_last_order.png"/>
</view>
<text class="homeItemText">打印上一单</text>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomePickUpGoodsClicked">
</view>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_pick_up_goods.png"/>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomeVerifyClicked">
<text class="homeItemText">提货</text>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_verify.png"/>
</view>
<text class="homeItemText">核验</text>
</view>
<view class="homeItemView" style="margin-top:12rpx;" onTap="onHomePickUpGoodsClicked">
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_pick_up_goods.png"/>
<text class="homeItemText">提货</text>
</view>
</view>
</view>
</view>
</
swiper-item
>
</
view
>
<
swiper-item>
</
swiper-item>
<view style="margin:0 auto;width:100%;height:352rpx;display:flex;flex-direction:column;"
>
<swiper-item
>
<view style="margin:0 auto;width:698rpx;height:100%;display:flex; flex-direction: row;margin-top:30rpx;flex-wrap:wrap;align-content:flex-start
;">
<view style="margin:0 auto;width:100%;height:352rpx;display:flex;flex-direction:column
;">
<view class="homeItemView" onTap="onHomeDayCheckClicked
">
<view style="margin:0 auto;width:698rpx;height:100%;display:flex; flex-direction: row;margin-top:30rpx;flex-wrap:wrap;align-content:flex-start;
">
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_day_check.png"/
>
<view class="homeItemView" onTap="onHomeDayCheckClicked"
>
<text class="homeItemText">日结</text
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_day_check.png"/
>
<
/view
>
<
text class="homeItemText">日结</text
>
<view class="homeItemView" onTap="onHomeAboutAppClicked"
>
</view
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_about_app.png"/
>
<view class="homeItemView" onTap="onHomeAboutAppClicked"
>
<text class="homeItemText">关于系统</text
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_about_app.png"/
>
<
/view
>
<
text class="homeItemText">关于系统</text
>
<view class="homeItemView" onTap="onHomeSysSettingClicked"
>
</view
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_sys_setting.png"/
>
<view class="homeItemView" onTap="onHomeSysSettingClicked"
>
<text class="homeItemText">系统设置</text
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_sys_setting.png"/
>
<
/view
>
<
text class="homeItemText">系统设置</text
>
<view class="homeItemView" onTap="onHomeAppSettingClicked"
>
</view
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_app_setting.png"/
>
<view class="homeItemView" onTap="onHomeAppSettingClicked"
>
<text class="homeItemText">应用设置</text
>
<image mode="aspectFit" style="margin:0 auto;width:96rpx;height:96rpx;" src="/images/img_app_setting.png"/
>
<
/view
>
<
text class="homeItemText">应用设置</text
>
</view>
</view>
</view>
</view>
</swiper-item>
</view>
</swiper>
</swiper-item>
</swiper>
</view>
<!-- 兑换优惠券 -->
<view class="page-coupon" a:if="{{convertCouponState != 0}}">
<view class="coupon-top">
<view class="coupon-back-container" onTap="convertCouponClose" a:if="{{convertCouponState == 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="{{convertCouponState == 1}}">兑换</view>
<view></view>
</view>
</view>
<!-- 等待扫描 -->
<!-- 兑换优惠券 -->
<view class="coupon-bottom" a:if="{{convertCouponState == 1}}">
<view class="page-coupon" a:if="{{convertCouponState != 0}}">
<text class="scan-coupon-text">等待顾客扫描兑换券码…</text>
<view class="coupon-top" >
<image class="scan-coupon-guide" mode="aspectFit" src="/images/scan_guide.png"/>
<view class="coupon-back-container" onTap="convertCouponClose" a:if="{{convertCouponState == 1}}">
<button class="cancel-use-coupon" size="default" type="ghost" onTap="convertCouponClose">关闭</button>
<image class="coupon-back-icon" mode="aspectFit" src="/images/icon_back.png"/>
</view>
<text class="coupon-back-text">返回</text>
<!-- 兑换中 -->
</view>
<view class="coupon-bottom" a:if="{{convertCouponState == 2}}">
<view class="coupon-title" a:if="{{convertCouponState == 1}}">兑换</view>
<text class="scan-coupon-text">正在兑换券码…</text>
<view></view>
<image class="scan-coupon-guide" mode="aspectFit" src="/images/scan_guide.png"/>
</view>
</view>
<!-- 等待扫描 -->
<!-- 兑换成功 -->
<view class="coupon-bottom" a:if="{{convertCouponState == 1}}">
<view class="coupon-bottom-success" a:if="{{convertCouponState == 3}}">
<text class="scan-coupon-text">等待顾客扫描兑换券码…</text>
<image class="scan-coupon-success" mode="aspectFit" src="/images/icon_success.png"/>
<image class="scan-coupon-guide" mode="aspectFit" src="/images/scan_guide.png"/>
<text class="scan-coupon-text-success">兑换码已识别</text>
<button class="cancel-use-coupon" size="default" type="ghost" onTap="convertCouponClose">关闭</button>
<button class="sure-use-coupon" type="primary" size="default" onTap="convertCouponClose">确定</button>
</view>
</view>
<!-- 兑换中 -->
<!-- 兑换失败 -->
<view class="coupon-bottom" a:if="{{convertCouponState == 2}}">
<view class="coupon-bottom-fail" a:if="{{convertCouponState == 4}}">
<text class="scan-coupon-text">正在兑换券码…</text>
<image class="scan-coupon-fail" mode="aspectFit" src="/images/icon_failed.png"/>
<image class="scan-coupon-guide" mode="aspectFit" src="/images/scan_guide.png"/>
<text class="scan-coupon-text-fail">兑换失败</text>
</view>
<text class="scan-coupon-text-fail-desr">{{convertCouponMsg}}</text>
<!-- 兑换成功 -->
<view class="failure-operation">
<view class="coupon-bottom-success" a:if="{{convertCouponState == 3}}">
<button class="close-use-coupon" type="ghost" size="default" onTap="convertCouponClose">关闭</button>
<image class="scan-coupon-success" mode="aspectFit" src="/images/icon_success.png"/>
<button class="again-use-coupon" type="primary" size="default" onTap="onHomeExchangeClicked">重新兑换</button>
<text class="scan-coupon-text-success">兑换码已识别</text>
<button class="sure-use-coupon" type="primary" size="default" onTap="convertCouponClose">确定</button>
</view>
<!-- 兑换失败 -->
<view class="coupon-bottom-fail" a:if="{{convertCouponState == 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">{{convertCouponMsg}}</text>
<view class="failure-operation">
<button class="close-use-coupon" type="ghost" size="default" onTap="convertCouponClose">关闭</button>
<button class="again-use-coupon" type="primary" size="default" onTap="onHomeExchangeClicked">重新兑换</button>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!--扫码页-->
<!--扫码页-->
<view hidden="{{!pageShow['landscan']}}">
<view hidden="{{!pageShow['landscan']}}">
...
@@ -280,48 +278,89 @@
...
@@ -280,48 +278,89 @@
</view>
</view>
</view>
</view>
</view>
</view>
<!--打印上一单-->
<view hidden="{{!pageShow['printlastorder']}}">
<view class="printLastOrderPage">
<!--下半部分布局-->
<view class="printLastOrderBottomView">
<text class="printLastOrderPrintStatusHint">{{printLastOrderPrintStatusHint}}</text>
<!--层叠布局-->
<view style="width:277rpx;height:196rpx;margin:0 auto;position:absolute;top:132rpx;left:0rpx;right:0rpx;display:relative;">
<image mode="aspectFit" style="width:277rpx;height:196rpx;margin:0 auto;" src="/images/bg_paper.png"/>
<block a:if="{{!printLastOrderIsPrinting}}">
<block a:if="{{!printLastOrderIsPrintSuccess}}">
<view style="position:absolute;margin:0 auto;top:107rpx;left:0rpx;right:0rpx;width:124rpx;height:41rpx;font-size:19rpx;">
<button size="mini" type="ghost" style="border-radius:20rpx;height:41rpx;width:124rpx;border-color:#F96146;" onTap="onPrintLastOrderRePrintClicked">
<text style="font-size:19rpx;color:#F96146;line-height:41rpx;text-align:center;position:absolute;top:0rpx;left:0rpx;right:0rpx;">重新打印</text></button>
</view>
</block>
<block a:else>
<!--打印成功-->
<text style="color:#333333;font-size:19rpx;position:absolute;left:0rpx;right:0rpx;margin:0 auto;width:100%;text-align:center;top:93rpx;">提示顾客带好小票</text>
</block>
</block>
</view>
<view style="position:absolute;top:342rpx;margin:0 auto;left:0rpx;right:0rpx;width:252rpx;height:60rpx;text-align:center;">
<block a:if="{{!printLastOrderIsPrintSuccess}}">
<button size="default" type="ghost" style="width:252rpx;height:60rpx;text-align:center;border-color:#007AFF;" onTap="onPrintLastOrderCancelClicked">
<text style="color:#007AFF;position:absolute;line-height:60rpx;left:0rpx;right:0rpx;font-size:24rpx;font-weight:bold;">取消</text></button>
</block>
<block a:else>
<button size="default" type="primary" style="width:252rpx;height:60rpx;text-align:center;border-color:#007AFF;color:#007AFF;" onTap="onPrintLastOrderConfirmClicked">
<text style="color:#ffffff;position:absolute;line-height:60rpx;left:0rpx;right:0rpx;font-size:24rpx;font-weight:bold;">确定</text></button>
</block>
</view>
</view>
<!--topTitle-->
<view class="topView" onTap="onPrintLastOrderBackClicked">
<!--title-->
<view class="printLastOrderTitleText">
<text>打印上一单</text>
</view>
<!--返回键-->
<view class="printLastOrderBackButton">
<image mode="aspectFit" style="width:9rpx;height:18rpx;margin-right:8rpx;" src="/images/icon_back.png"/>
<text>返回</text>
</view>
</view>
</view>
</view>
<!-- 键盘 -->
<!-- 键盘 -->
<land-keybord scene="{{scene}}" onKeyBordFinished="onKeyBordFinished" onKeyBordClose="onKeyBordClose">
<land-keybord scene="{{scene}}" onKeyBordFinished="onKeyBordFinished" onKeyBordClose="onKeyBordClose">
</land-keybord>
</land-keybord>
<!-- 等待前屏登录 -->
<!-- 等待前屏登录 -->
<view class="login-waiting-page" a:if="{{!isFrontScreenLoginOK}}">
<view class="login-waiting-page" a:if="{{!isFrontScreenLoginOK}}">
<image class="login-waiting-left" mode="aspectFill" src="/images/login_wait_left.png"/>
<image class="login-waiting-left" mode="aspectFill" src="/images/login_wait_left.png"/>
<view class="login-waiting-right">
<view class="login-waiting-right">
<image class="login-waiting-right-image" mode="aspectFit" src="/images/login_waiting_right.png"/>
<image class="login-waiting-right-image" mode="aspectFit" src="/images/login_waiting_right.png"/>
</view>
</view>
<!-- 操作结果页 -->
<!-- 操作结果页 -->
<view hidden="{{!pageShow['operateResult']}}">
<view hidden="{{!pageShow['operateResult']}}">
<view class="operateTopView"></view>
<view class="operateTopView"></view>
<view class="operateBodyView">
<view class="operateBodyView">
<block a:if="{{operateSuccess}}">
<block a:if="{{operateSuccess}}">
<image class="operateResultIcon" mode="aspectFit" src="/images/icon_success.png"/>
<image class="operateResultIcon" mode="aspectFit" src="/images/icon_success.png"/>
<view class="operateResultText">{{operateSuccessRemind}}</view>
<view class="operateResultText">{{operateSuccessRemind}}</view>
<view class="operateResultDesc">{{operateSuccessDesc}}</view>
<view class="operateResultDesc">{{operateSuccessDesc}}</view>
<view class="operateResultBtnContainer">
<view class="operateResultBtnContainer">
<view class="operateResultConfirmBtn">
<view class="operateResultConfirmBtn">
<view class="operateResultConfirmBtnText">确定</view>
<view class="operateResultConfirmBtnText">确定</view>
</view>
</view>
</view>
</block>
<block a:else>
<image class="operateResultIcon" mode="aspectFit" src="/images/icon_failed.png"/>
<view class="operateResultText">{{operateFailedRemind}}</view>
<view class="operateResultDesc">{{operateFailedDesc}}</view>
<view class="operateResultBtnContainer">
<view class="operateResultCloseBtn">
<view class="operateResultCloseBtnText">关闭</view>
</view>
</view>
<view class="operateResultConfirmBtn">
</block>
<view class="operateResultConfirmBtnText">重新退款</view>
<block a:else>
<image class="operateResultIcon" mode="aspectFit" src="/images/icon_failed.png"/>
<view class="operateResultText">{{operateFailedRemind}}</view>
<view class="operateResultDesc">{{operateFailedDesc}}</view>
<view class="operateResultBtnContainer">
<view class="operateResultCloseBtn">
<view class="operateResultCloseBtnText">关闭</view>
</view>
<view class="operateResultConfirmBtn">
<view class="operateResultConfirmBtnText">重新退款</view>
</view>
</view>
</view>
</block>
</view>
</view>
</block>
</view>
</view>
</view>
</view>
\ No newline at end of file
</view>
\ No newline at end of file
pages/index/index.js
View file @
d006f2dc
...
@@ -17,7 +17,7 @@ import { ACTION_REFUND } from '../../const/actioncmd'
...
@@ -17,7 +17,7 @@ import { ACTION_REFUND } from '../../const/actioncmd'
import
{
ACTION_REFUND_SUCCESS
}
from
'../../const/actioncmd'
import
{
ACTION_REFUND_SUCCESS
}
from
'../../const/actioncmd'
import
{
ACTION_REFUND_FAILED
}
from
'../../const/actioncmd'
import
{
ACTION_REFUND_FAILED
}
from
'../../const/actioncmd'
import
{
FLOW_IDLE
,
FLOW_COLLECTIONS
,
FLOW_REFUND
}
from
'../../const/actioncmd'
import
{
FLOW_IDLE
,
FLOW_COLLECTIONS
,
FLOW_REFUND
}
from
'../../const/actioncmd'
Page
({
Page
({
data
:
{
data
:
{
//页面控制相关参数
//页面控制相关参数
...
@@ -26,11 +26,12 @@ Page({
...
@@ -26,11 +26,12 @@ Page({
"landscan"
:
false
,
"landscan"
:
false
,
"waitoperate"
:
false
,
"waitoperate"
:
false
,
"payresult"
:
false
,
"payresult"
:
false
,
"operateResult"
:
false
"operateResult"
:
false
,
"printlastorder"
:
false
,
},
},
// 前屏是否完成登录
// 前屏是否完成登录
isFrontScreenLoginOK
:
fals
e
,
isFrontScreenLoginOK
:
tru
e
,
flowType
:
""
,
//流程类型:用于区分易混淆的流程,以及共同界面使用时用该标识位作为区分
flowType
:
""
,
//流程类型:用于区分易混淆的流程,以及共同界面使用时用该标识位作为区分
storeName
:
"--"
,
storeName
:
"--"
,
/**支付结果页相关参数 */
/**支付结果页相关参数 */
payFailedReason
:
"xxxxxxxxxxx"
,
payFailedReason
:
"xxxxxxxxxxx"
,
...
@@ -41,7 +42,7 @@ Page({
...
@@ -41,7 +42,7 @@ Page({
isPrintSuccess
:
false
,
isPrintSuccess
:
false
,
payPriceFen
:
0
,
payPriceFen
:
0
,
/**商品扫码页相关参数 */
/**商品扫码页相关参数 */
//是否正在用券
//是否正在用券
couponUseing
:
false
,
couponUseing
:
false
,
...
@@ -61,11 +62,17 @@ Page({
...
@@ -61,11 +62,17 @@ Page({
totalDisc
:
0.00
,
totalDisc
:
0.00
,
goods
:
[
goods
:
[
],
],
operateSuccess
:
false
,
operateSuccess
:
false
,
operateSuccessRemind
:
"退款成功"
,
operateSuccessRemind
:
"退款成功"
,
operateSuccessDesc
:
"退款完成!会在1~2个工作日返还到付款账户"
,
operateSuccessDesc
:
"退款完成!会在1~2个工作日返还到付款账户"
,
operateFailedRemind
:
"退款失败"
,
operateFailedRemind
:
"退款失败"
,
operateFailedDesc
:
"核销失败!无效的订单码"
,
operateFailedDesc
:
"核销失败!无效的订单码"
,
//打印上一单页面
printLastOrderPrintStatusHint
:
"正在打印上一单..."
,
//是否打印成功
printLastOrderIsPrintSuccess
:
false
,
printLastOrderIsPrinting
:
true
},
},
/**跳转页面方法 */
/**跳转页面方法 */
...
@@ -75,7 +82,8 @@ Page({
...
@@ -75,7 +82,8 @@ Page({
"landscan"
:
false
,
"landscan"
:
false
,
"waitoperate"
:
false
,
"waitoperate"
:
false
,
"payresult"
:
false
,
"payresult"
:
false
,
"operateResult"
:
false
,
"operateResult"
:
false
,
"printlastorder"
:
false
};
};
//遍历pageShow
//遍历pageShow
for
(
var
key
in
pageShowTemp
)
{
for
(
var
key
in
pageShowTemp
)
{
...
@@ -94,7 +102,7 @@ Page({
...
@@ -94,7 +102,7 @@ Page({
onLoad
(
query
)
{
onLoad
(
query
)
{
// 页面加载
// 页面加载
console
.
info
(
`Page onLoad with query:
${
JSON
.
stringify
(
query
)}
`
);
console
.
info
(
`Page onLoad with query:
${
JSON
.
stringify
(
query
)}
`
);
},
},
onReady
()
{
onReady
()
{
// 页面加载完成
// 页面加载完成
...
@@ -155,7 +163,7 @@ Page({
...
@@ -155,7 +163,7 @@ Page({
context
.
goPage
(
'landscan'
);
context
.
goPage
(
'landscan'
);
}
else
if
(
res
.
action
==
ACTION_GO_BALANCE
)
{
}
else
if
(
res
.
action
==
ACTION_GO_BALANCE
)
{
//跳转
//跳转
context
.
goPage
(
'waitoperate'
);
context
.
goPage
(
'waitoperate'
);
}
else
if
(
res
.
action
==
ACTION_ON_PAY_SUCCESS
)
{
}
else
if
(
res
.
action
==
ACTION_ON_PAY_SUCCESS
)
{
//分转元
//分转元
...
@@ -178,32 +186,32 @@ Page({
...
@@ -178,32 +186,32 @@ Page({
context
.
setData
({
context
.
setData
({
storeName
:
res
.
data
.
storeName
storeName
:
res
.
data
.
storeName
});
});
}
else
if
(
res
.
action
==
ACTION_DIRECT_PAYMENT
)
{
}
else
if
(
res
.
action
==
ACTION_DIRECT_PAYMENT
)
{
//直接收款
//直接收款
if
(
res
.
data
!=
null
)
{
if
(
res
.
data
!=
null
)
{
context
.
setData
({
totalPrice
:
res
.
data
})
context
.
setData
({
totalPrice
:
res
.
data
})
}
}
context
.
goPage
(
'waitoperate'
);
context
.
goPage
(
'waitoperate'
);
}
else
if
(
res
.
action
==
ACTION_CONVERT_COUPON
)
{
}
else
if
(
res
.
action
==
ACTION_CONVERT_COUPON
)
{
//兑换券
//兑换券
context
.
setData
({
convertCouponState
:
res
.
data
.
state
})
context
.
setData
({
convertCouponState
:
res
.
data
.
state
})
if
(
null
!=
res
.
data
.
msg
)
{
if
(
null
!=
res
.
data
.
msg
)
{
context
.
setData
({
convertCouponMsg
:
res
.
data
.
msg
})
context
.
setData
({
convertCouponMsg
:
res
.
data
.
msg
})
}
}
}
else
if
(
res
.
action
==
ACTION_LOGIN_OK
)
{
}
else
if
(
res
.
action
==
ACTION_LOGIN_OK
)
{
//前屏登录完成
//前屏登录完成
context
.
setData
({
isFrontScreenLoginOK
:
true
})
context
.
setData
({
isFrontScreenLoginOK
:
true
})
}
else
if
(
res
.
action
==
ACTION_REFUND_SUCCESS
)
{
}
else
if
(
res
.
action
==
ACTION_REFUND_SUCCESS
)
{
//跳转到成功页面
//跳转到成功页面
context
.
goPage
(
'operateResult'
);
context
.
goPage
(
'operateResult'
);
}
else
if
(
res
.
action
==
ACTION_REFUND_FAILED
)
{
}
else
if
(
res
.
action
==
ACTION_REFUND_FAILED
)
{
context
.
setData
({
context
.
setData
({
isPaySuccess
:
false
,
isPaySuccess
:
false
,
});
});
context
.
goPage
(
'operateResult'
);
context
.
goPage
(
'operateResult'
);
}
}
}
}
});
});
...
@@ -255,15 +263,15 @@ Page({
...
@@ -255,15 +263,15 @@ Page({
/**首页相关 */
/**首页相关 */
/**立即收款 */
/**立即收款 */
onHomeCashierImmediatelyClicked
()
{
onHomeCashierImmediatelyClicked
()
{
this
.
setData
({
scene
:
3
})
this
.
setData
({
scene
:
3
})
},
},
/**
/**
* 兑换
* 兑换
*/
*/
onHomeExchangeClicked
()
{
onHomeExchangeClicked
()
{
this
.
setData
({
convertCouponState
:
1
})
this
.
setData
({
convertCouponState
:
1
})
this
.
sendConvertCouponToFront
(
1
)
this
.
sendConvertCouponToFront
(
1
)
},
},
/**
/**
...
@@ -278,17 +286,18 @@ Page({
...
@@ -278,17 +286,18 @@ Page({
*/
*/
onHomeRefundClicked
()
{
onHomeRefundClicked
()
{
this
.
setData
({
this
.
setData
({
flowType
:
FLOW_REFUND
,
flowType
:
FLOW_REFUND
,
scene
:
4
scene
:
4
})
})
console
.
log
(
"scene:"
+
this
.
data
.
scene
)
console
.
log
(
"scene:"
+
this
.
data
.
scene
)
},
},
/**
/**
* 打印上一单
* 打印上一单
*/
*/
onHomePrintLastOrderClicked
()
{
onHomePrintLastOrderClicked
()
{
//跳转至打印上一单页面
this
.
goPage
(
'printlastorder'
);
},
},
/**
/**
...
@@ -390,7 +399,7 @@ Page({
...
@@ -390,7 +399,7 @@ Page({
});
});
},
},
//发生直接收银事件
//发生直接收银事件
sendPaymentToFront
(
payment
)
{
sendPaymentToFront
(
payment
)
{
var
commonRequest
=
{
var
commonRequest
=
{
...
@@ -415,7 +424,7 @@ Page({
...
@@ -415,7 +424,7 @@ Page({
});
});
},
},
});
});
},
},
/**landscan页面逻辑方法 */
/**landscan页面逻辑方法 */
//把所有的商品数据发送到后屏
//把所有的商品数据发送到后屏
...
@@ -442,17 +451,17 @@ Page({
...
@@ -442,17 +451,17 @@ Page({
//键盘完成
//键盘完成
onKeyBordFinished
(
result
)
{
onKeyBordFinished
(
result
)
{
if
(
this
.
data
.
scene
==
3
)
{
if
(
this
.
data
.
scene
==
3
)
{
this
.
sendPaymentToFront
(
result
)
this
.
sendPaymentToFront
(
result
)
}
else
if
(
this
.
data
.
scene
==
1
)
{
}
else
if
(
this
.
data
.
scene
==
1
)
{
this
.
sendGoodsInfoToFront
(
result
)
this
.
sendGoodsInfoToFront
(
result
)
}
else
if
(
this
.
data
.
scene
==
4
)
{
}
else
if
(
this
.
data
.
scene
==
4
)
{
this
.
sendRefund
(
result
);
this
.
sendRefund
(
result
);
return
;
return
;
}
}
this
.
onKeyBordClose
();
this
.
onKeyBordClose
();
},
},
//把手输条码发生到前屏
//把手输条码发生到前屏
sendGoodsInfoToFront
(
barcode
)
{
sendGoodsInfoToFront
(
barcode
)
{
my
.
showLoading
({});
my
.
showLoading
({});
...
@@ -620,31 +629,31 @@ Page({
...
@@ -620,31 +629,31 @@ Page({
//兑换券界面关闭
//兑换券界面关闭
convertCouponClose
(
e
)
{
convertCouponClose
(
e
)
{
this
.
setData
({
convertCouponState
:
0
})
this
.
setData
({
convertCouponState
:
0
})
this
.
sendConvertCouponToFront
(
0
)
this
.
sendConvertCouponToFront
(
0
)
},
},
//发生兑换券到前屏
//发生兑换券到前屏
sendConvertCouponToFront
(
res
)
{
sendConvertCouponToFront
(
res
)
{
let
context
=
this
;
let
context
=
this
;
my
.
ix
.
sendBuddyMessage
({
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
frontScreenAppId
,
target
:
getApp
().
globalData
.
frontScreenAppId
,
data
:
{
data
:
{
action
:
ACTION_CONVERT_COUPON
,
action
:
ACTION_CONVERT_COUPON
,
data
:
res
data
:
res
},
},
success
:
(
sres
)
=>
{
success
:
(
sres
)
=>
{
console
.
log
(
"兑换券通知前屏 成功 ===》"
+
JSON
.
stringify
(
sres
));
console
.
log
(
"兑换券通知前屏 成功 ===》"
+
JSON
.
stringify
(
sres
));
},
},
fail
:
(
fres
)
=>
{
fail
:
(
fres
)
=>
{
console
.
log
(
"兑换券通知前屏 失败 ===》 "
+
JSON
.
stringify
(
fres
));
console
.
log
(
"兑换券通知前屏 失败 ===》 "
+
JSON
.
stringify
(
fres
));
context
.
sendConvertCouponToFront
(
res
)
context
.
sendConvertCouponToFront
(
res
)
}
}
})
})
},
},
//用券返回
//用券返回
couponBack
(
e
)
{
couponBack
(
e
)
{
...
@@ -654,31 +663,44 @@ Page({
...
@@ -654,31 +663,44 @@ Page({
useCoupon
(
e
)
{
useCoupon
(
e
)
{
this
.
setData
({
couponUseing
:
true
})
this
.
setData
({
couponUseing
:
true
})
},
},
//发送退款金额.以分为单位
//发送退款金额.以分为单位
sendRefund
(
amount
){
sendRefund
(
amount
)
{
var
miyapay
=
require
(
"/utils/miyapay4.js"
);
var
miyapay
=
require
(
"/utils/miyapay4.js"
);
var
refundAmount
=
miyapay
.
yuan2Fen
(
amount
);
var
refundAmount
=
miyapay
.
yuan2Fen
(
amount
);
console
.
log
(
"amount"
+
refundAmount
);
console
.
log
(
"amount"
+
refundAmount
);
my
.
ix
.
sendBuddyMessage
({
my
.
ix
.
sendBuddyMessage
({
target
:
getApp
().
globalData
.
frontScreenAppId
,
target
:
getApp
().
globalData
.
frontScreenAppId
,
data
:{
data
:
{
action
:
ACTION_REFUND
,
action
:
ACTION_REFUND
,
data
:
refundAmount
data
:
refundAmount
},
},
success
:(
res
)
=>
{
success
:
(
res
)
=>
{
//成功发送则
//成功发送则
console
.
log
(
"发送退款金额到前屏小程序成功 ===》"
+
JSON
.
stringify
(
res
));
console
.
log
(
"发送退款金额到前屏小程序成功 ===》"
+
JSON
.
stringify
(
res
));
},
},
fail
:(
res
)
=>
{
fail
:
(
res
)
=>
{
my
.
showToast
({
my
.
showToast
({
type
:
'fail'
,
type
:
'fail'
,
content
:
'发送退款金额到前屏失败'
,
content
:
'发送退款金额到前屏失败'
,
duration
:
3000
,
duration
:
3000
,
success
:
()
=>
{
success
:
()
=>
{
},
},
});
});
}
}
})
})
}
},
/**
* 打印上一单页面
*/
onPrintLastOrderCancelClicked
()
{
},
onPrintLastOrderConfirmClicked
()
{
},
onPrintLastOrderRePrintClicked
()
{
},
onPrintLastOrderBackClicked
(){}
});
});
pages/printlastorder/printlastorder.acss
0 → 100644
View file @
d006f2dc
.printLastOrderPage {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
position: absolute;
}
.topView {
position: absolute;
top: 0rpx;
width: 100%;
height: 60rpx;
background: #ffffff;
box-shadow: 0rpx 2rpx 7rpx 0rpx rgba(153, 153, 153, 0.16);
/* border: 2px solid red; */
}
.printLastOrderTitleText {
position: absolute;
line-height: 60rpx;
height: 100%;
font-size: 22rpx;
font-weight: bold;
text-align: center;
align-items: center;
width: 100%;
color: #333333;
align-content: center;
/* border: 2px solid red; */
}
.printLastOrderBackButton {
position: absolute;
height: 60rpx;
text-align: center;
align-items: center;
align-content: center;
font-size: 19rpx;
line-height: 60rpx;
/* border: 2px solid red; */
padding-left: 19rpx;
padding-right: 19rpx;
}
.printLastOrderBottomView {
height: 100%;
background: white;
width: 100%;
position: absolute;
/* display: flex;
flex-direction: column; */
/* border: 2px solid red; */
}
.printLastOrderPrintStatusHint {
color: #333333;
font-size: 26rpx;
margin: 0 auto;
width: 100%;
text-align: center;
font-weight: bold;
position: absolute;
top: 89rpx;
}
\ No newline at end of file
pages/printlastorder/printlastorder.axml
0 → 100644
View file @
d006f2dc
<view class="printLastOrderPage">
<!--下半部分布局-->
<view class="printLastOrderBottomView">
<text class="printLastOrderPrintStatusHint">{{printLastOrderPrintStatusHint}}</text>
<!--层叠布局-->
<view style="width:277rpx;height:196rpx;margin:0 auto;position:absolute;top:132rpx;left:0rpx;right:0rpx;display:relative;">
<image mode="aspectFit" style="width:277rpx;height:196rpx;margin:0 auto;" src="/images/bg_paper.png"/>
<block a:if="{{!printLastOrderIsPrintSuccess}}">
<view style="position:absolute;margin:0 auto;top:107rpx;left:0rpx;right:0rpx;width:124rpx;height:41rpx;font-size:19rpx;">
<button size="mini" type="ghost" style="border-radius:20rpx;height:41rpx;width:124rpx;border-color:#F96146;" onTap="onPrintLastOrderRePrintClicked">
<text style="font-size:19rpx;color:#F96146;line-height:41rpx;text-align:center;position:absolute;top:0rpx;left:0rpx;right:0rpx;">重新打印</text></button>
</view>
</block>
<block a:else>
<!--打印成功-->
<text style="color:#333333;font-size:19rpx;position:absolute;left:0rpx;right:0rpx;margin:0 auto;width:100%;text-align:center;top:93rpx;">提示顾客带好小票</text>
</block>
</view>
<view style="position:absolute;top:342rpx;margin:0 auto;left:0rpx;right:0rpx;width:252rpx;height:60rpx;text-align:center;">
<block a:if="{{!printLastOrderIsPrintSuccess}}">
<button size="default" type="ghost" style="width:252rpx;height:60rpx;text-align:center;border-color:#007AFF;" onTap="onPrintLastOrderCancelClicked">
<text style="color:#007AFF;position:absolute;line-height:60rpx;left:0rpx;right:0rpx;font-size:24rpx;font-weight:bold;">取消</text></button>
</block>
<block a:else>
<button size="default" type="primary" style="width:252rpx;height:60rpx;text-align:center;border-color:#007AFF;color:#007AFF;" onTap="onPrintLastOrderConfirmClicked">
<text style="color:#ffffff;position:absolute;line-height:60rpx;left:0rpx;right:0rpx;font-size:24rpx;font-weight:bold;">确定</text></button>
</block>
</view>
</view>
<!--topTitle-->
<view class="topView" onTap="onPosterPageBack">
<!--title-->
<view class="printLastOrderTitleText">
<text>打印上一单</text>
</view>
<!--返回键-->
<view class="printLastOrderBackButton">
<image mode="aspectFit" style="width:9rpx;height:18rpx;margin-right:8rpx;" src="/images/icon_back.png"/>
<text>返回</text>
</view>
</view>
</view>
\ No newline at end of file
pages/printlastorder/printlastorder.js
0 → 100644
View file @
d006f2dc
Page
({
data
:
{
printLastOrderPrintStatusHint
:
"正在打印上一单..."
,
//是否打印成功
printLastOrderIsPrintSuccess
:
false
},
onLoad
()
{
},
onPrintLastOrderCancelClicked
()
{
},
onPrintLastOrderConfirmClicked
()
{
},
onPrintLastOrderRePrintClicked
()
{
}
});
pages/printlastorder/printlastorder.json
0 → 100644
View file @
d006f2dc
{
"transparentTitle"
:
"always"
}
\ 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