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
ac7a9c06
Commit
ac7a9c06
authored
Mar 05, 2020
by
pengguangpu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调换打印上一单的打印中状态重置顺序;
parent
081e8e35
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
index.js
pages/index/index.js
+13
-8
No files found.
pages/index/index.js
View file @
ac7a9c06
...
...
@@ -318,21 +318,24 @@ Page({
//打印上一单结果返回
//获取到打印结果
var
printLastOrderResult
=
res
.
data
;
context
.
setData
({
printLastOrderIsPrinting
:
false
});
if
(
printLastOrderResult
.
code
==
0
)
{
//打印成功
context
.
setData
({
printLastOrderIsPrintSuccess
:
true
,
printLastOrderPrintStatusHint
:
"打印完成"
});
context
.
setData
({
printLastOrderIsPrinting
:
false
});
}
else
{
//打印失败
context
.
setData
({
printLastOrderIsPrintSuccess
:
false
,
printLastOrderPrintStatusHint
:
"打印失败"
});
context
.
setData
({
printLastOrderIsPrinting
:
false
});
}
}
else
if
(
res
.
action
==
ACTION_GET_CUR_AD
)
{
//拿到当前显示的图片url
...
...
@@ -523,6 +526,7 @@ Page({
if
(
this
.
data
.
printEnabled
!=
true
)
{
return
;
}
let
context
=
this
;
//发送指令至前屏
//通知前屏重新打印
my
.
ix
.
sendBuddyMessage
({
...
...
@@ -533,14 +537,15 @@ Page({
data
:
null
},
success
:
(
res
)
=>
{
console
.
info
(
`sendBuddyMessage success:
${
JSON
.
stringify
(
res
)}
`
);
console
.
info
(
`onHomePrintLastOrderClicked sendBuddyMessage success:
${
JSON
.
stringify
(
res
)}
`
);
//跳转至打印上一单页面
context
.
goPage
(
'printlastorder'
);
},
fail
:
(
res
)
=>
{
console
.
info
(
`sendBuddyMessage failed:
${
JSON
.
stringify
(
res
)}
`
);
context
.
showToast
(
"发送指令失败"
);
}
});
//跳转至打印上一单页面
this
.
goPage
(
'printlastorder'
);
},
/**
...
...
@@ -962,7 +967,7 @@ Page({
goPay
(
e
)
{
//购物车不能为空
if
(
this
.
data
.
goods
.
length
==
0
)
{
this
.
showToast
(
"等待收银员录入商品"
,
3000
)
this
.
showToast
(
"等待收银员录入商品"
,
3000
)
return
}
...
...
@@ -988,7 +993,7 @@ Page({
//后屏跳转
this
.
goPage
(
'waitoperate'
);
var
miyapay
=
require
(
"/utils/miyapay4.js"
);
var
amount
=
miyapay
.
fen2Yuan
(
miyapay
.
yuan2Fen
(
this
.
data
.
totalPrice
)
-
miyapay
.
yuan2Fen
(
this
.
data
.
discCouponPrice
));
var
amount
=
miyapay
.
fen2Yuan
(
miyapay
.
yuan2Fen
(
this
.
data
.
totalPrice
)
-
miyapay
.
yuan2Fen
(
this
.
data
.
discCouponPrice
));
this
.
setData
({
waitOperateAmount
:
amount
,
});
...
...
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