From 2b8910f6a1947880bd1506f452cfc1948cc8d52b Mon Sep 17 00:00:00 2001
From: gyq <875626088@qq.com>
Date: Fri, 15 Mar 2024 11:12:55 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=BB=93=E7=AE=97=E8=AE=A2?=
=?UTF-8?q?=E5=8D=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
index.html | 2 +-
src/api/pay.js | 13 ++++++
src/components/payCard/payCard.vue | 5 ++-
src/components/payCard/scanModal.vue | 33 +++++++++------
src/views/home/components/goods.vue | 37 +++++++++++++---
src/views/home/components/settleAccount.vue | 47 +++++++++++++++------
src/views/home/index.vue | 6 +--
vite.config.js | 2 +-
8 files changed, 107 insertions(+), 38 deletions(-)
diff --git a/index.html b/index.html
index 2859b32..45a8a5e 100644
--- a/index.html
+++ b/index.html
@@ -5,7 +5,7 @@
-
Vite + Vue
+ 银收客
diff --git a/src/api/pay.js b/src/api/pay.js
index f209c16..a6a750f 100644
--- a/src/api/pay.js
+++ b/src/api/pay.js
@@ -76,4 +76,17 @@ export function queryOrder(params) {
url: "pay/queryOrder",
params
});
+}
+
+/**
+ * 打印
+ * @param {*} params
+ * @returns
+ */
+export function print(params) {
+ return request({
+ method: "get",
+ url: "cloudPrinter/print",
+ params
+ });
}
\ No newline at end of file
diff --git a/src/components/payCard/payCard.vue b/src/components/payCard/payCard.vue
index 1b7e178..4267148 100644
--- a/src/components/payCard/payCard.vue
+++ b/src/components/payCard/payCard.vue
@@ -144,7 +144,7 @@ async function confirmOrder() {
if (props.selecttype == 1) {//1 代表会员
} else {
-
+
}
break;
default:
@@ -186,6 +186,9 @@ async function queryPayTypeAjax() {
shopId: store.userInfo.shopId
})
payList.value = res
+ if (res[0].payType == 'scanCode') {
+ scanModalRef.value.show()
+ }
} catch (error) {
console.log(error)
}
diff --git a/src/components/payCard/scanModal.vue b/src/components/payCard/scanModal.vue
index 065c210..4f0ba93 100644
--- a/src/components/payCard/scanModal.vue
+++ b/src/components/payCard/scanModal.vue
@@ -14,10 +14,11 @@
-
+
立即支付
@@ -160,13 +161,14 @@ function delHandle() {
}
// 监听扫码枪回车事件
-function enterHandle() {
- inputRef.value.focus()
-}
+// function enterHandle() {
+// inputRef.value.focus()
+// }
-// const inputChange = _.debounce(function (e) {
-// console.log(e);
-// }, 300)
+const inputChange = _.debounce(function (e) {
+ // console.log(e);
+ submitHandle()
+}, 500)
function show() {
dialogVisible.value = true
@@ -192,6 +194,11 @@ defineExpose({