From c83b03c9800145ba00682e3351b9e6f46c8ee901 Mon Sep 17 00:00:00 2001 From: "zhaoxingchang.sd" Date: Fri, 15 Nov 2024 09:09:20 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=A2=9E=E5=8A=A0=E7=A8=8E=E5=B1=80?= =?UTF-8?q?=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- html/wxscaninvoice/Followorder.html | 192 ++++++++++++++++------------ js/wxscaninvoice/transferPage.js | 32 ++++- js/wxscaninvoice/writing.js | 11 +- 3 files changed, 147 insertions(+), 88 deletions(-) diff --git a/html/wxscaninvoice/Followorder.html b/html/wxscaninvoice/Followorder.html index 41d7cc7..8b48a0a 100644 --- a/html/wxscaninvoice/Followorder.html +++ b/html/wxscaninvoice/Followorder.html @@ -2,87 +2,95 @@ - - - - 发票开具 - + + + + 发票开具 + -
+

发票开具申请已提交
请关注
- 个人邮箱或微信卡包或联系商家

了解更多发票状态!

- + 个人邮箱或微信卡包或联系商家
了解更多发票状态!

+
- -

请关注个人邮箱或微信卡包或联系商家
- 了解更多发票状态!

+ +

请关注个人邮箱或微信卡包或联系商家
+ 了解更多发票状态!

+
-
+
@@ -91,16 +99,38 @@ diff --git a/js/wxscaninvoice/transferPage.js b/js/wxscaninvoice/transferPage.js index 64373a9..2eafecc 100644 --- a/js/wxscaninvoice/transferPage.js +++ b/js/wxscaninvoice/transferPage.js @@ -105,14 +105,14 @@ function getOrderInfoByTqm() { }), async: false, success: function (data) { - alert_loading_close(); window.sessionStorage.setItem("fpzls", JSON.stringify(data.fpzls)); //发票类型 window.sessionStorage.setItem("orderInfo", JSON.stringify(data.orderInfo)); // 订单信息 window.sessionStorage.setItem("orderItemInfoList", JSON.stringify(data.orderItemList)); //开票项目 window.sessionStorage.setItem("titleInfo", JSON.stringify(data.titleInfo)) //抬头信息 - console.log(data.titleInfo,'11111111111') + window.sessionStorage.setItem("ewmInfo", JSON.stringify(data.ewm)) //二维码信息 if (data.code === "0000") { //处理成功 + getOrderEwm() //判断是否是公众号,如果是公众号需要走授权逻辑,如果不是,直接到填开页 if(window.localStorage.getItem("routerType") === "1"){ toPage("/html/wxscaninvoice/writing.html"); @@ -178,3 +178,31 @@ function getOrderInfoByTqm() { } }); } +function getOrderEwm() { + console.log('getOrderEwm','接口请求') + + let ewm = JSON.parse(window.sessionStorage.getItem("ewmInfo")) //二维码信息 + $.ajax({ + type: "post", + url: config.projectUrl + '/FPGLXT/wb/queryEwmjfxz', + contentType: "application/json;charset=utf-8", + async: false, + data:JSON.stringify({ + fphm: ewm.fphm, + kpf_nsrsbh:ewm.kpf_nsrsbh, + kprq:ewm.kprq?.replace(/[- :]/g, ''),// "2024-10-24 17:04:03" => "20241024170403" + nsrsbh:ewm.nsrsbh, + wjlx:'1' + }), + success: function (data) { + if(data.code === '0000'){ + window.sessionStorage.setItem("ewm-URL", JSON.stringify(data.data)); + }else { + window.sessionStorage.setItem("ewm-URL",''); + } + }, + error: function (data) { + console.log(data,'error') + } + }); +} diff --git a/js/wxscaninvoice/writing.js b/js/wxscaninvoice/writing.js index 3f3eb1d..b7b7b57 100644 --- a/js/wxscaninvoice/writing.js +++ b/js/wxscaninvoice/writing.js @@ -1243,19 +1243,19 @@ function emailOnblur() { function isValidEmail(email) { // 定义不同的正则表达式 // 定义用于匹配QQ邮箱地址的正则表达式 - const qqEmailRegex = /^[a-zA-Z0-9]+@qq\.com$/; + const qqEmailRegex = /^[^@ ]+@qq\.com$/; // 定义用于匹配钉钉邮箱地址的正则表达式 - const dingtalkEmailRegex = /^[a-zA-Z0-9]+@dingtalk\.com$/; + const dingtalkEmailRegex = /^[^@ ]+@dingtalk\.com$/; // 定义用于匹配网易邮箱地址的正则表达式,包括163.com, 126.com, yeah.net - const neteaseEmailRegex = /^[a-zA-Z0-9]+@(163\.com|126\.com|yeah\.net)$/; + const neteaseEmailRegex = /^[^@ ]+@(163\.com|126\.com|yeah\.net)$/; // 定义用于匹配阿里云邮箱地址的正则表达式 - const aliyunEmailRegex = /^[a-zA-Z0-9]+@aliyun\.com$/; + const aliyunEmailRegex = /^[^@ ]+@aliyun\.com$/; // 定义用于匹配微软邮箱地址的正则表达式,包括outlook.com, hotmail.com, live.com - const microsoftEmailRegex = /^[a-zA-Z0-9]+@(outlook\.com|hotmail\.com|live\.com)$/; + const microsoftEmailRegex = /^[^@ ]+@(outlook\.com|hotmail\.com|live\.com)$/; // 检查是否符合任一邮箱格式 return ( @@ -1267,6 +1267,7 @@ function isValidEmail(email) { ); } + /*验证发票类型*/ function fplxOnblur() { const fplx = $.trim($fpType.val());