优化结算订单

This commit is contained in:
gyq
2024-03-15 11:12:55 +08:00
parent 861e62ce15
commit 2b8910f6a1
8 changed files with 107 additions and 38 deletions

View File

@@ -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)
}

View File

@@ -14,10 +14,11 @@
</div>
<div class="input">
<el-input ref="inputRef" v-model="scanCode"
style="height: calc(var(--el-component-size-large) + 20px);" placeholder="请扫描付款码"
@keydown.enter="enterHandle" clearable></el-input>
style="height: calc(var(--el-component-size-large) + 30px);" placeholder="请扫描付款码" clearable
@change="inputChange"></el-input>
<div class="tips">注意扫码支付请保证输入框获得焦点</div>
</div>
<div class="number_warp">
<!-- <div class="number_warp">
<div class="item" v-for="item in 9" :key="item" @click="inputHandle(item)">{{ item }}</div>
<div class="item disabled">.</div>
<div class="item" @click="inputHandle(0)">0</div>
@@ -26,7 +27,7 @@
<CloseBold />
</el-icon>
</div>
</div>
</div> -->
<div class="btn">
<el-button type="primary" style="width: 100%;" v-loading="loading"
@click="submitHandle">立即支付</el-button>
@@ -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({
</script>
<style scoped lang="scss">
.tips {
padding-top: 10px;
color: #999;
}
.dialog :deep(.el-dialog__body) {
padding: 0 !important;
}
@@ -263,9 +270,9 @@ defineExpose({
}
}
.btn {
padding-top: 20px;
}
// .btn {
// padding-top: 20px;
// }
}
.pay_wait {