修复bug,更新代码

This commit is contained in:
mkm 2024-06-09 17:56:06 +08:00
parent a75534084b
commit f278009f18
2 changed files with 540 additions and 515 deletions

View File

@ -1,10 +1,10 @@
<script setup> <script setup>
import { ref, watch, nextTick, computed, onMounted, onUnmounted } from "vue"; import {ref, watch, nextTick, computed, onMounted, onUnmounted} from "vue";
import { orderCreateApi, orderStatusApi, orderPayApi } from "@/api/store.js"; import {orderCreateApi, orderStatusApi, orderPayApi} from "@/api/store.js";
import { ElMessage } from "element-plus"; import {ElMessage} from "element-plus";
import { audioplay } from "@/utils/audio.js"; import {audioplay} from "@/utils/audio.js";
import mitt from "@/utils/mitt.js"; import mitt from "@/utils/mitt.js";
import { useUserStore } from "@/store/user.js"; import {useUserStore} from "@/store/user.js";
const drawer = ref(false); const drawer = ref(false);
const active = ref(1); const active = ref(1);
@ -434,13 +434,34 @@ onUnmounted(() => {
现金收款 现金收款
</div> </div>
</div> </div>
<div>
<div v-if="form.activities==1" style="display: inline-block;margin-right: 20px">
<div style="display: inline-block;margin-right: 20px">
<div style="color: #999;padding: 2rem 0 0.3rem 0">原价:</div>
<div style="color: #f5222d; padding-bottom: 2rem">
¥<span style="font-size: 1.6rem">{{ form.original_price }}</span>
</div>
</div>
<div style="display: inline-block;">
<div style="color: #999;padding: 2rem 0 0.3rem 0">活动折扣:</div>
<div style="color: #f5222d; padding-bottom: 2rem">
{{ form.activity }}¥<span style="font-size: 1.6rem">{{ form.activity_price }}</span>
</div>
</div>
</div>
<div style="display: inline-block ">
<div style="color: #999; padding: 2rem 0 0.3rem 0">应收金额():</div> <div style="color: #999; padding: 2rem 0 0.3rem 0">应收金额():</div>
<div style="color: #f5222d; padding-bottom: 2rem"> <div style="color: #f5222d; padding-bottom: 2rem">
¥<span style="font-size: 1.6rem">{{ form.pay_price }}</span> ¥<span style="font-size: 1.6rem">{{ form.pay_price }}</span>
</div> </div>
</div>
</div>
<div v-loading="loading" element-loading-text="支付中" class="card1" v-if="active == 1"> <div v-loading="loading" element-loading-text="支付中" class="card1" v-if="active == 1">
<el-input ref="codeRef" v-model="input" autofocus class="code-input" placeholder="请点击输入框聚焦扫码或输入编码号" <el-input ref="codeRef" v-model="input" autofocus class="code-input"
@keyup.enter="handleEnter" @focus="isFocus = true" @blur="isFocus = false" /> placeholder="请点击输入框聚焦扫码或输入编码号"
@keyup.enter="handleEnter" @focus="isFocus = true" @blur="isFocus = false"/>
<div class="tips"></div> <div class="tips"></div>
</div> </div>
<div class="card2" v-else> <div class="card2" v-else>
@ -462,13 +483,17 @@ onUnmounted(() => {
</div> </div>
<div class="keypad"> <div class="keypad">
<div class="left"> <div class="left">
<el-button v-for="item in numList" :key="item" @click="numTap(item)">{{ item <el-button v-for="item in numList" :key="item" @click="numTap(item)">{{
}}</el-button> item
}}
</el-button>
</div> </div>
<div class="right"> <div class="right">
<el-button @click="delNum"><el-icon> <el-button @click="delNum">
<Delete /> <el-icon>
</el-icon></el-button> <Delete/>
</el-icon>
</el-button>
<el-button @click="delNum(-1)">C</el-button> <el-button @click="delNum(-1)">C</el-button>
<el-button class="enter" :class="{ 'enter-disable': +collection < +form.total }" <el-button class="enter" :class="{ 'enter-disable': +collection < +form.total }"
:disabled="+collection < +form.total" @click="cashBnt"> :disabled="+collection < +form.total" @click="cashBnt">
@ -501,7 +526,7 @@ onUnmounted(() => {
width: 25rem; width: 25rem;
display: flex; display: flex;
&>div { & > div {
flex: 1; flex: 1;
border: 1px solid #ccc; border: 1px solid #ccc;
text-align: center; text-align: center;

View File

@ -236,7 +236,7 @@ onUnmounted(() => {
.cahier { .cahier {
&::before { &::before {
content: "收银"; content: "平台";
font-weight: 400; font-weight: 400;
font-size: 0.7rem; font-size: 0.7rem;
padding: 0.1rem 0.1rem; padding: 0.1rem 0.1rem;