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({