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
cab5fb70
Commit
cab5fb70
authored
Feb 27, 2020
by
pengguangpu
Browse files
Options
Browse Files
Download
Plain Diff
合并远程代码
parents
cbd714e3
a9a4fcdd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
90 additions
and
33 deletions
+90
-33
actioncmd.js
const/actioncmd.js
+13
-2
index.acss
pages/index/index.acss
+2
-0
index.axml
pages/index/index.axml
+11
-14
index.js
pages/index/index.js
+64
-17
No files found.
const/actioncmd.js
View file @
cab5fb70
...
@@ -70,11 +70,22 @@ export const ACTION_BALANCE_BACK_GOODS = "ACTION_BALANCE_BACK_GOODS";
...
@@ -70,11 +70,22 @@ export const ACTION_BALANCE_BACK_GOODS = "ACTION_BALANCE_BACK_GOODS";
//日结打印
//日结打印
export
const
ACTION_DAY_CHECK
=
"ACTION_DAY_CHECK"
;
export
const
ACTION_DAY_CHECK
=
"ACTION_DAY_CHECK"
;
//核验
export
const
ACTION_VERIFY
=
"ACTION_VERIFY"
;
//核验成功
export
const
ACTION_VERIFY_SUCCESS
=
"ACTION_VERIFY_SUCCESS"
;
//核验失败
export
const
ACTION_VERIFY_FAILED
=
"ACTION_VERIFY_FAILED"
;
const
FLOW_IDLE
=
"idle"
;
const
FLOW_IDLE
=
"idle"
;
const
FLOW_COLLECTIONS
=
"collections"
;
//收款
const
FLOW_COLLECTIONS
=
"collections"
;
//收款
const
FLOW_REFUND
=
"refund"
;
//退款
const
FLOW_REFUND
=
"refund"
;
//退款
const
FLOW_DIRECT_PAYMENT
=
"direct_payment"
const
FLOW_DIRECT_PAYMENT
=
"direct_payment"
//直接收款
const
FLOW_VERIFY
=
"verify"
;
//核验
export
{
export
{
FLOW_IDLE
,
FLOW_COLLECTIONS
,
FLOW_REFUND
,
FLOW_DIRECT_PAYMENT
FLOW_IDLE
,
FLOW_COLLECTIONS
,
FLOW_REFUND
,
FLOW_DIRECT_PAYMENT
,
FLOW_VERIFY
}
}
pages/index/index.acss
View file @
cab5fb70
...
@@ -698,6 +698,8 @@
...
@@ -698,6 +698,8 @@
position: relative;
position: relative;
width: 47.2%;
width: 47.2%;
height: 100%;
height: 100%;
margin-left: auto;
margin-right: auto;
align-items: center;
align-items: center;
background: #ffffff;
background: #ffffff;
}
}
...
...
pages/index/index.axml
View file @
cab5fb70
...
@@ -161,8 +161,8 @@
...
@@ -161,8 +161,8 @@
<view class="operating-bottom">
<view class="operating-bottom">
<text class="total-num">共{{totalQuantity}}件商品,合计金额</text>
<text class="total-num">共{{totalQuantity}}件商品,合计金额</text>
<view class="total-price-container">
<view class="total-price-container">
<text class="pay-price">¥{{totalPrice}}</text>
<text class="pay-price">¥{{totalPrice}}</text>
<text class="pay-coupon" a:if="{{discCouponPrice != 0}}">-¥{{discCouponPrice}}</text>
<text class="pay-coupon" a:if="{{discCouponPrice != 0}}">-¥{{discCouponPrice}}</text>
</view>
</view>
<button class="go-pay" size="default" type="primary" onTap="goPay">收款</button>
<button class="go-pay" size="default" type="primary" onTap="goPay">收款</button>
</view>
</view>
...
@@ -213,7 +213,7 @@
...
@@ -213,7 +213,7 @@
</view>
</view>
<!-- 界面主体 -->
<!-- 界面主体 -->
<view class="bodyContainer">
<view class="bodyContainer">
<view class="leftBody">
<view class="leftBody"
hidden="{{waitOperateHideLeft}}"
>
<view class="contentLine" style="margin-top:29rpx;" hidden="{{flowType!='collections'}}">
<view class="contentLine" style="margin-top:29rpx;" hidden="{{flowType!='collections'}}">
<view class="descText">合计金额:</view>
<view class="descText">合计金额:</view>
<view class="totalPrice">¥{{totalPrice}}</view>
<view class="totalPrice">¥{{totalPrice}}</view>
...
@@ -225,7 +225,6 @@
...
@@ -225,7 +225,6 @@
<view style="position: absolute;display: flex;flex-direction: row;align-items: baseline;bottom:22rpx;left:0rpx;padding-left: 29rpx;">
<view style="position: absolute;display: flex;flex-direction: row;align-items: baseline;bottom:22rpx;left:0rpx;padding-left: 29rpx;">
<view class="descText">{{waitOperateMoneyRemind}}</view>
<view class="descText">{{waitOperateMoneyRemind}}</view>
<view class="moneySign">¥</view>
<view class="moneySign">¥</view>
<view class="payPrice">{{waitOperateAmount}}</view>
<view class="payPrice">{{waitOperateAmount}}</view>
<view class="descText" hidden="{{flowType!='collections'}}">(共{{totalQuantity}}件)</view>
<view class="descText" hidden="{{flowType!='collections'}}">(共{{totalQuantity}}件)</view>
</view>
</view>
...
@@ -386,15 +385,13 @@
...
@@ -386,15 +385,13 @@
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 等待前屏登录 -->
<!-- 等待前屏登录 -->
<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>
</view>
<!-- 操作结果页 -->
<!-- 操作结果页 -->
<view hidden="{{!pageShow['operateresult']}}">
<view hidden="{{!pageShow['operateresult']}}">
<view class="operateTopView"></view>
<view class="operateTopView"></view>
...
@@ -404,8 +401,8 @@
...
@@ -404,8 +401,8 @@
<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"
onTap="operateResultClose"
>
<view class="operateResultConfirmBtnText"
onTap="operateResultClose"
>确定</view>
<view class="operateResultConfirmBtnText">确定</view>
</view>
</view>
</view>
</view>
</block>
</block>
...
@@ -414,11 +411,11 @@
...
@@ -414,11 +411,11 @@
<view class="operateResultText">{{operateFailedRemind}}</view>
<view class="operateResultText">{{operateFailedRemind}}</view>
<view class="operateResultDesc">{{operateFailedDesc}}</view>
<view class="operateResultDesc">{{operateFailedDesc}}</view>
<view class="operateResultBtnContainer">
<view class="operateResultBtnContainer">
<view class="operateResultCloseBtn">
<view class="operateResultCloseBtn"
onTap="operateResultClose"
>
<view class="operateResultCloseBtnText"
onTap="operateResultClose"
>关闭</view>
<view class="operateResultCloseBtnText">关闭</view>
</view>
</view>
<view class="operateResultConfirmBtn">
<view class="operateResultConfirmBtn"
onTap="operateResultReOperate"
>
<view class="operateResultConfirmBtnText"
onTap="operateResultReOperate"
>{{operateReDo}}</view>
<view class="operateResultConfirmBtnText">{{operateReDo}}</view>
</view>
</view>
</view>
</view>
</block>
</block>
...
...
pages/index/index.js
View file @
cab5fb70
...
@@ -3,13 +3,14 @@ import {
...
@@ -3,13 +3,14 @@ import {
ACTION_USE_COUPON
,
ACTION_GOODS
,
ACTION_MEMBER
,
ACTION_USE_COUPON
,
ACTION_GOODS
,
ACTION_MEMBER
,
ACTION_GO_BALANCE
,
ACTION_REQUEST_GOOD_INFO
,
ACTION_PRINT_RESULT
,
ACTION_GO_BALANCE
,
ACTION_REQUEST_GOOD_INFO
,
ACTION_PRINT_RESULT
,
ACTION_REPRINT
,
ACTION_GO_SCAN
,
ACTION_ON_PAY_SUCCESS
,
ACTION_REPRINT
,
ACTION_GO_SCAN
,
ACTION_ON_PAY_SUCCESS
,
ACTION_ON_PAY_FAILED
,
ACTION_GO_HOME
,
ACTION_GET_ACCOUNT
,
ACTION_ON_PAY_FAILED
,
ACTION_GO_HOME
,
ACTION_DIRECT_PAYMENT
,
ACTION_CONVERT_COUPON
,
ACTION_LOGIN_OK
,
ACTION_DIRECT_PAYMENT
,
ACTION_CONVERT_COUPON
,
ACTION_LOGIN_OK
,
ACTION_REFUND
,
ACTION_REFUND_SUCCESS
,
ACTION_REFUND_FAILED
,
ACTION_REFUND
,
ACTION_REFUND_SUCCESS
,
ACTION_REFUND_FAILED
,
ACTION_PRINT_LAST_ORDER
,
ACTION_GET_CUR_AD
,
ACTION_SEND_SEL_AD
,
ACTION_PRINT_LAST_ORDER
,
ACTION_GET_CUR_AD
,
ACTION_SEND_SEL_AD
,
ACTION_SYSTEM_SETTING
,
ACTION_BALANCE_BACK_GOODS
,
ACTION_DAY_CHECK
ACTION_SYSTEM_SETTING
,
ACTION_BALANCE_BACK_GOODS
,
ACTION_DAY_CHECK
,
ACTION_VERIFY
,
ACTION_VERIFY_SUCCESS
,
ACTION_VERIFY_FAILED
,
}
from
'../../const/actioncmd'
}
from
'../../const/actioncmd'
import
{
FLOW_IDLE
,
FLOW_COLLECTIONS
,
FLOW_REFUND
,
FLOW_DIRECT_PAYMENT
}
from
'../../const/actioncmd'
import
{
FLOW_IDLE
,
FLOW_COLLECTIONS
,
FLOW_REFUND
,
FLOW_DIRECT_PAYMENT
,
FLOW_VERIFY
}
from
'../../const/actioncmd'
Page
({
Page
({
...
@@ -79,12 +80,11 @@ Page({
...
@@ -79,12 +80,11 @@ Page({
/** 等待操作页面的参数 */
/** 等待操作页面的参数 */
//左上角的显示隐藏,左下角的文字提示
//左上角的显示隐藏,左下角的文字提示
waitOperateRemindText
:
"等待顾客付款…"
,
waitOperateRemindText
:
"等待顾客付款…"
,
waitOperateCancelText
:
"取消收款"
,
waitOperateCancelText
:
"取消收款"
,
waitOperateCancelRecheckShow
:
false
,
waitOperateMoneyRemind
:
"应收款:"
,
waitOperateMoneyRemind
:
"应收款:"
,
waitOperateAmount
:
0.00
,
waitOperateAmount
:
0.00
,
waitOperateHideLeft
:
false
,
/** 操作结果页参数 */
/** 操作结果页参数 */
//在操作中携带的内容,可自定义内容,每次操作的开始和结束应当把该值给重置
//在操作中携带的内容,可自定义内容,每次操作的开始和结束应当把该值给重置
...
@@ -263,14 +263,15 @@ Page({
...
@@ -263,14 +263,15 @@ Page({
operateSuccessRemind
:
"退款成功"
,
operateSuccessRemind
:
"退款成功"
,
operateSuccessDesc
:
"退款完成!会在1~2个工作日返还到付款账户"
,
operateSuccessDesc
:
"退款完成!会在1~2个工作日返还到付款账户"
,
});
});
context
.
goPage
(
'operate
R
esult'
);
context
.
goPage
(
'operate
r
esult'
);
}
else
if
(
res
.
action
==
ACTION_REFUND_FAILED
)
{
}
else
if
(
res
.
action
==
ACTION_REFUND_FAILED
)
{
context
.
setData
({
context
.
setData
({
operateSuccess
:
false
,
operateSuccess
:
false
,
operateFailedRemind
:
"退款失败"
,
operateFailedRemind
:
"退款失败"
,
operateFailedDesc
:
res
.
data
,
operateFailedDesc
:
res
.
data
,
operateReDo
:
"重新退款"
,
});
});
context
.
goPage
(
'operate
R
esult'
);
context
.
goPage
(
'operate
r
esult'
);
}
else
if
(
res
.
action
==
ACTION_PRINT_LAST_ORDER
&&
context
.
data
.
pageShow
[
'printlastorder'
]
==
true
)
{
}
else
if
(
res
.
action
==
ACTION_PRINT_LAST_ORDER
&&
context
.
data
.
pageShow
[
'printlastorder'
]
==
true
)
{
//打印上一单结果返回
//打印上一单结果返回
//获取到打印结果
//获取到打印结果
...
@@ -316,19 +317,37 @@ Page({
...
@@ -316,19 +317,37 @@ Page({
discCouponMsg
:
coupon
.
discCouponMsg
,
discCouponMsg
:
coupon
.
discCouponMsg
,
discCouponPrice
:
coupon
.
discCouponPrice
discCouponPrice
:
coupon
.
discCouponPrice
})
})
}
else
if
(
res
.
action
==
ACTION_BALANCE_BACK_GOODS
)
{
}
else
if
(
res
.
action
==
ACTION_BALANCE_BACK_GOODS
)
{
//结算页面回到扫商品页面
//结算页面回到扫商品页面
context
.
goPage
(
'landscan'
);
context
.
goPage
(
'landscan'
);
}
else
if
(
res
.
action
==
ACTION_DAY_CHECK
)
{
}
else
if
(
res
.
action
==
ACTION_DAY_CHECK
)
{
//收到日结处理回调
//收到日结处理回调
var
printDayCheckResult
=
res
.
data
;
var
printDayCheckResult
=
res
.
data
;
if
(
printDayCheckResult
.
code
==
0
)
{
if
(
printDayCheckResult
.
code
==
0
)
{
//打印成功
//打印成功
my
.
showToast
({
content
:
"打印成功"
});
my
.
showToast
({
content
:
"打印成功"
});
}
else
{
}
else
{
//打印失败
//打印失败
my
.
showToast
({
content
:
"打印失败"
});
my
.
showToast
({
content
:
"打印失败"
});
}
}
context
.
goPage
(
'landscan'
);
}
else
if
(
res
.
action
==
ACTION_VERIFY_SUCCESS
)
{
//核验成功
//跳转到成功页面
context
.
setData
({
operateSuccess
:
true
,
operateSuccessRemind
:
"核验成功"
,
operateSuccessDesc
:
"核销完成!请提示顾客可以离场"
,
});
context
.
goPage
(
'operateresult'
);
}
else
if
(
res
.
action
==
ACTION_VERIFY_FAILED
)
{
context
.
setData
({
operateSuccess
:
true
,
operateSuccessRemind
:
"核销失败"
,
operateSuccessDesc
:
res
.
data
,
operateReDo
:
"重新扫描"
,
});
context
.
goPage
(
'operateresult'
);
}
}
}
}
});
});
...
@@ -381,6 +400,7 @@ Page({
...
@@ -381,6 +400,7 @@ Page({
operateContext
:
{},
//重新初始化
operateContext
:
{},
//重新初始化
memberPhone
:
''
,
memberPhone
:
''
,
memberPhoneShown
:
''
,
memberPhoneShown
:
''
,
waitOperateHideLeft
:
false
,
})
})
},
},
...
@@ -470,7 +490,30 @@ Page({
...
@@ -470,7 +490,30 @@ Page({
* 核验
* 核验
*/
*/
onHomeVerifyClicked
()
{
onHomeVerifyClicked
()
{
this
.
setData
({
flowType
:
FLOW_VERIFY
,
})
//跳转等待页
this
.
goPage
(
'waitoperate'
);
this
.
setData
({
waitOperateRemindText
:
"请提示顾客核验订单…"
,
waitOperateCancelText
:
"关闭"
,
waitOperateHideLeft
:
true
,
})
my
.
ix
.
sendBuddyMessage
({
// 填入目标小程序的 AppID
target
:
getApp
().
globalData
.
frontScreenAppId
,
data
:
{
action
:
ACTION_VERIFY
,
data
:
null
},
success
:
(
res
)
=>
{
console
.
info
(
`sendBuddyMessage success:
${
JSON
.
stringify
(
res
)}
`
);
},
fail
:
(
res
)
=>
{
console
.
info
(
`sendBuddyMessage failed:
${
JSON
.
stringify
(
res
)}
`
);
}
});
},
},
/**
/**
...
@@ -492,7 +535,7 @@ Page({
...
@@ -492,7 +535,7 @@ Page({
},
},
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
console
.
info
(
`sendBuddyMessage success:
${
JSON
.
stringify
(
res
)}
`
);
console
.
info
(
`sendBuddyMessage success:
${
JSON
.
stringify
(
res
)}
`
);
my
.
showToast
({
content
:
"正在打印中"
});
my
.
showToast
({
content
:
"正在打印中"
});
},
},
fail
:
(
res
)
=>
{
fail
:
(
res
)
=>
{
console
.
info
(
`sendBuddyMessage failed:
${
JSON
.
stringify
(
res
)}
`
);
console
.
info
(
`sendBuddyMessage failed:
${
JSON
.
stringify
(
res
)}
`
);
...
@@ -927,8 +970,10 @@ Page({
...
@@ -927,8 +970,10 @@ Page({
recheckRemind
:
"确定要取消此支付订单吗?"
,
recheckRemind
:
"确定要取消此支付订单吗?"
,
recheckShow
:
true
,
recheckShow
:
true
,
});
});
}
else
if
(
this
.
data
.
flowType
==
FLOW_VERIFY
)
{
//直接退出到home
this
.
goHome
();
}
}
},
},
//兑换券界面关闭
//兑换券界面关闭
...
@@ -1110,6 +1155,8 @@ Page({
...
@@ -1110,6 +1155,8 @@ Page({
if
(
this
.
data
.
flowType
==
FLOW_REFUND
)
{
if
(
this
.
data
.
flowType
==
FLOW_REFUND
)
{
//重新进行退款操作,后屏重新进入
//重新进行退款操作,后屏重新进入
this
.
sendRefund
(
null
);
this
.
sendRefund
(
null
);
}
else
if
(
this
.
data
.
flowType
==
FLOW_VERIFY
)
{
this
.
onHomeVerifyClicked
();
}
}
},
},
...
...
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