MYS: fix image & e_receipt price bug

This commit is contained in:
Pakin 2025-06-20 09:29:44 +07:00
parent 1a3c0e81fa
commit 038e13a00a
9 changed files with 463 additions and 560 deletions

View file

@ -1,4 +1,5 @@
<Popup>
<Cache> "Enable" </Cache>
<Width> 1080 </Width>
<Height> 1920 </Height>
<Background> BackgroundColor </Background>
@ -6,9 +7,22 @@
<EventOpen>
DEBUGVAR Seeker.e_receipt
If Seeker.e_receipt = "false" Then
Open "ROOT/taobin_project/xml/page_drinkok.xml"
EndIf
Var ProductDesc = ""
Var Timeout = 0
Var service = "eInvoice.mys"
Var EReceiptQR = ""
; build uri
Var INVOICE_URL = ""
Var Final_INVOICE_URL = ""
If Seeker.VendingTSID = "" Then
DEBUGVAR Seeker.VendingTSID
DEBUGVAR VendingTSID
@ -28,21 +42,73 @@
DEBUGVAR Seeker.showname
DEBUGVAR Seeker.PictureDrink
Var PureName2 = ""
If ProMysteryCup = 1 Then
If Seeker.FromProMysteryCup = "true" Then
STRCONTAIN "size" Seeker.shownameMystery SizeFromSheet
If SizeFromSheet = "true" Then
SPLIT Seeker.shownameMystery "###" 1 PureName2
Else
Var PureName2 = Seeker.shownameMystery
EndIf
EndIf
EndIf
DEBUGVAR PureName2
Var ShowNameMystery = "Invisible"
If ProMysteryCup = 1 Then
If Seeker.FromProMysteryCup = "true" Then
Var ShowNameMystery = "Enable"
Else
Var ShowNameMystery = "Invisible"
EndIf
Else
Var ShowNameMystery = "Invisible"
EndIf
Var EReceiptImgDir = CountryRootPath + "/image/page_e_receipt/"
Var EReceiptQRDialog = EReceiptImgDir + "img_popup_eReceiptPrompt_result.png"
TRY "ROOT/taobin_project/inter/mys/xml/process/e_receipt.ev"
Var LOADING_STATE = "Enable"
Var QR_STATE = "Invisible"
Refresh
</EventOpen>
<Timeout> 1000 </Timeout>
<EventTimeout>
DEBUGVAR VendingTSID
Var Seeker.VendingTSID = VendingTSID
DEBUGVAR Seeker.VendingTSID
DEBUGVAR LOADING_STATE
DEBUGVAR QR_STATE
DEBUGVAR Seeker.e_receipt
Var Timeout = Timeout + 1
If Timeout = 5 Then
Var LOADING_STATE = "Invisible"
SAVELOG "TSID should be ready!"
TRY "ROOT/taobin_project/inter/mys/xml/process/e_receipt.ev"
Refresh
EndIf
If Timeout > 10 Then
If Timeout > 5 Then
Var QR_STATE = "Enable"
Refresh
EndIf
If Timeout > 15 Then
Open "ROOT/taobin_project/xml/page_drinkok.xml"
@ -81,7 +147,7 @@ TimerReset
<Y> 875 </Y>
<Width> 250 </Width>
<Height> 250 </Height>
<State> "Enable" </State>
<State> QR_STATE </State>
<Service> service </Service>
</QRCode>
@ -89,19 +155,22 @@ TimerReset
<Image>
<X> 175 </X>
<Y> 1100 </Y>
<Y> 1200 </Y>
<Height> 300 </Height>
<Width> 320 </Width>
<Filename> Seeker.PictureDrink </Filename>
</Image>
<Text>
<X> 300 </X>
<Y> 1200 </Y>
<Width> 1080 </Width>
<Align> Center </Align>
<X> 450 </X>
<Y> 1250 </Y>
<Width> 443 </Width>
<Font> KanitLightTTF </Font>
<Size> 48 </Size>
<LineHeight> 30 </LineHeight>
<MaxSize> 40 </MaxSize>
<MinSize> 24 </MinSize>
<MaxLine> 2 </MaxLine>
<Size> Auto </Size>
<Color> HeadlineColor </Color>
<Value>
eval(
@ -116,7 +185,20 @@ TimerReset
</Value>
</Text>
<Text>
<X> 450 </X>
<Y> 1250 </Y>
<Width> 443 </Width>
<Font> KanitLightTTF </Font>
<LineHeight> 30 </LineHeight>
<MaxSize> 40 </MaxSize>
<MinSize> 24 </MinSize>
<MaxLine> 2 </MaxLine>
<Size> Auto </Size>
<Color> HeadlineColor </Color>
<State> ShowNameMystery </State>
<Value> PureName2 </Value>
</Text>
@ -126,7 +208,7 @@ TimerReset
<Text>
<X> 450 </X>
<Y> 1300 </Y>
<Y> 1325 </Y>
<Font> KanitTTF </Font>
<Size> 48 </Size>
<Width> 1080 </Width>
@ -134,5 +216,14 @@ TimerReset
<Value> Seeker.PriceDrinkTmpShow </Value>
</Text>
<GIF>
<X> 493 </X>
<Y> 1068 </Y>
<Width> 94 </Width>
<Height> 94 </Height>
<State> LOADING_STATE </State>
<Filename> "ROOT/taobin_project/image/page_payment_en/page_payment/loading.gif" </Filename>
</GIF>
</Popup>