新增退单支付密码、会员充值支付密码
This commit is contained in:
parent
a70fa744b2
commit
2a09a3fd5b
|
|
@ -1 +1,171 @@
|
||||||
"use strict";const i=require("path"),e=require("electron");let a;e.app.whenReady().then(()=>{a=new e.BrowserWindow({title:"银收客",width:1024,height:768,fullscreenable:!0,fullscreen:!process.env.VITE_DEV_SERVER_URL,simpleFullscreen:!0,frame:!!process.env.VITE_DEV_SERVER_URL,webPreferences:{nodeIntegration:!0,contextIsolation:!1}}),process.env.VITE_DEV_SERVER_URL?a.loadURL(process.env.VITE_DEV_SERVER_URL):a.loadFile(i.resolve(__dirname,"../dist/index.html")),e.app.on("activate",()=>{e.BrowserWindow.getAllWindows().length===0&&createWindow()}),e.ipcMain.on("quitHandler",(t,n)=>{e.app.quit()}),e.ipcMain.on("getPrintList",()=>{a.webContents.getPrintersAsync().then(t=>{a.webContents.send("printList",t)})});const o=new e.BrowserWindow({show:!1,width:464,height:1726,webPreferences:{nodeIntegration:!0,contextIsolation:!1}});process.env.VITE_DEV_SERVER_URL?o.loadFile(i.join(__dirname,"../public/print.html")):o.loadFile(i.resolve(__dirname,"../dist/print.html")),e.ipcMain.on("printerInfoSync",(t,n)=>{o.webContents.send("getParams",n)}),e.ipcMain.on("printStart",(t,n)=>{console.log(n);let r=JSON.parse(n).deviceName;o.webContents.print({silent:!0,deviceName:r,pageSize:{width:58e3,height:216e3},scaleFactor:80,landscape:!1,margins:{marginType:"none",top:0,bottom:0,left:0,right:0},dpi:{horizontal:203,vertical:203}})});const s=new e.BrowserWindow({show:!1,width:464,height:1726,webPreferences:{nodeIntegration:!0,contextIsolation:!1}});process.env.VITE_DEV_SERVER_URL?s.loadFile(i.join(__dirname,"../public/work_print.html")):s.loadFile(i.resolve(__dirname,"../dist/work_print.html")),e.ipcMain.on("printerWorkSync",(t,n)=>{s.webContents.send("getParams",n)}),e.ipcMain.on("printWorkStart",(t,n)=>{let r=JSON.parse(n).deviceName;s.webContents.print({silent:!0,deviceName:r,pageSize:{width:58e3,height:216e3},scaleFactor:80,landscape:!1,margins:{marginType:"none",top:0,bottom:0,left:0,right:0},dpi:{horizontal:203,vertical:203}})});const l=new e.BrowserWindow({show:!1,width:320,height:240,webPreferences:{nodeIntegration:!0,contextIsolation:!1}});process.env.VITE_DEV_SERVER_URL?l.loadFile(i.join(__dirname,"../public/tag_print.html")):l.loadFile(i.resolve(__dirname,"../dist/tag_print.html")),e.ipcMain.on("printerTagSync",(t,n)=>{console.log(n),l.webContents.send("getParams",n)}),e.ipcMain.on("printTagStart",(t,n)=>{let r=JSON.parse(n).deviceName;l.webContents.print({silent:!0,deviceName:r,pageSize:{width:4e4,height:3e4},scaleFactor:80,landscape:!1,margins:{marginType:"none",top:0,bottom:0,left:0,right:0},dpi:{horizontal:203,vertical:203}})})});e.app.on("window-all-closed",()=>{process.platform!=="darwin"&&e.app.quit()});
|
"use strict";
|
||||||
|
const path = require("path");
|
||||||
|
const electron = require("electron");
|
||||||
|
let win;
|
||||||
|
electron.app.whenReady().then(() => {
|
||||||
|
win = new electron.BrowserWindow({
|
||||||
|
title: "银收客",
|
||||||
|
width: 1024,
|
||||||
|
height: 768,
|
||||||
|
fullscreenable: true,
|
||||||
|
fullscreen: process.env.VITE_DEV_SERVER_URL ? false : true,
|
||||||
|
simpleFullscreen: true,
|
||||||
|
frame: process.env.VITE_DEV_SERVER_URL ? true : false,
|
||||||
|
webPreferences: {
|
||||||
|
// 集成网页和 Node.js,也就是在渲染进程中,可以调用 Node.js 方法
|
||||||
|
nodeIntegration: true,
|
||||||
|
contextIsolation: false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (process.env.VITE_DEV_SERVER_URL) {
|
||||||
|
win.loadURL(process.env.VITE_DEV_SERVER_URL);
|
||||||
|
} else {
|
||||||
|
win.loadFile(path.resolve(__dirname, "../dist/index.html"));
|
||||||
|
}
|
||||||
|
electron.app.on("activate", () => {
|
||||||
|
if (electron.BrowserWindow.getAllWindows().length === 0) {
|
||||||
|
createWindow();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
electron.ipcMain.on("quitHandler", (_, msg) => {
|
||||||
|
electron.app.quit();
|
||||||
|
});
|
||||||
|
electron.ipcMain.on("getPrintList", () => {
|
||||||
|
win.webContents.getPrintersAsync().then((res) => {
|
||||||
|
win.webContents.send("printList", res);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
const printWin = new electron.BrowserWindow({
|
||||||
|
show: false,
|
||||||
|
width: 464,
|
||||||
|
height: 1726,
|
||||||
|
webPreferences: {
|
||||||
|
// 集成网页和 Node.js,也就是在渲染进程中,可以调用 Node.js 方法
|
||||||
|
nodeIntegration: true,
|
||||||
|
contextIsolation: false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (process.env.VITE_DEV_SERVER_URL) {
|
||||||
|
printWin.loadFile(path.join(__dirname, "../public/print.html"));
|
||||||
|
} else {
|
||||||
|
printWin.loadFile(path.resolve(__dirname, "../dist/print.html"));
|
||||||
|
}
|
||||||
|
electron.ipcMain.on("printerInfoSync", (event, arg) => {
|
||||||
|
printWin.webContents.send("getParams", arg);
|
||||||
|
});
|
||||||
|
electron.ipcMain.on("printStart", (event, arg) => {
|
||||||
|
console.log(arg);
|
||||||
|
const _parmas = JSON.parse(arg);
|
||||||
|
let name = _parmas.deviceName;
|
||||||
|
printWin.webContents.print({
|
||||||
|
silent: true,
|
||||||
|
deviceName: name,
|
||||||
|
pageSize: {
|
||||||
|
width: 58e3,
|
||||||
|
height: 216e3
|
||||||
|
},
|
||||||
|
scaleFactor: 80,
|
||||||
|
landscape: false,
|
||||||
|
margins: {
|
||||||
|
marginType: "none",
|
||||||
|
top: 0,
|
||||||
|
bottom: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0
|
||||||
|
},
|
||||||
|
dpi: {
|
||||||
|
horizontal: 203,
|
||||||
|
vertical: 203
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
const workPrintWin = new electron.BrowserWindow({
|
||||||
|
show: false,
|
||||||
|
width: 464,
|
||||||
|
height: 1726,
|
||||||
|
webPreferences: {
|
||||||
|
nodeIntegration: true,
|
||||||
|
contextIsolation: false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (process.env.VITE_DEV_SERVER_URL) {
|
||||||
|
workPrintWin.loadFile(path.join(__dirname, "../public/work_print.html"));
|
||||||
|
} else {
|
||||||
|
workPrintWin.loadFile(path.resolve(__dirname, "../dist/work_print.html"));
|
||||||
|
}
|
||||||
|
electron.ipcMain.on("printerWorkSync", (event, arg) => {
|
||||||
|
workPrintWin.webContents.send("getParams", arg);
|
||||||
|
});
|
||||||
|
electron.ipcMain.on("printWorkStart", (event, arg) => {
|
||||||
|
const _parmas = JSON.parse(arg);
|
||||||
|
let name = _parmas.deviceName;
|
||||||
|
workPrintWin.webContents.print({
|
||||||
|
silent: true,
|
||||||
|
deviceName: name,
|
||||||
|
pageSize: {
|
||||||
|
width: 58e3,
|
||||||
|
height: 216e3
|
||||||
|
},
|
||||||
|
scaleFactor: 80,
|
||||||
|
landscape: false,
|
||||||
|
margins: {
|
||||||
|
marginType: "none",
|
||||||
|
top: 0,
|
||||||
|
bottom: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0
|
||||||
|
},
|
||||||
|
dpi: {
|
||||||
|
horizontal: 203,
|
||||||
|
vertical: 203
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
const tagPrintWin = new electron.BrowserWindow({
|
||||||
|
show: false,
|
||||||
|
width: 320,
|
||||||
|
height: 240,
|
||||||
|
webPreferences: {
|
||||||
|
nodeIntegration: true,
|
||||||
|
contextIsolation: false
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (process.env.VITE_DEV_SERVER_URL) {
|
||||||
|
tagPrintWin.loadFile(path.join(__dirname, "../public/tag_print.html"));
|
||||||
|
} else {
|
||||||
|
tagPrintWin.loadFile(path.resolve(__dirname, "../dist/tag_print.html"));
|
||||||
|
}
|
||||||
|
electron.ipcMain.on("printerTagSync", (event, arg) => {
|
||||||
|
console.log(arg);
|
||||||
|
tagPrintWin.webContents.send("getParams", arg);
|
||||||
|
});
|
||||||
|
electron.ipcMain.on("printTagStart", (event, arg) => {
|
||||||
|
const _parmas = JSON.parse(arg);
|
||||||
|
let name = _parmas.deviceName;
|
||||||
|
tagPrintWin.webContents.print({
|
||||||
|
silent: true,
|
||||||
|
deviceName: name,
|
||||||
|
pageSize: {
|
||||||
|
width: 4e4,
|
||||||
|
height: 3e4
|
||||||
|
},
|
||||||
|
scaleFactor: 80,
|
||||||
|
landscape: false,
|
||||||
|
margins: {
|
||||||
|
marginType: "none",
|
||||||
|
top: 0,
|
||||||
|
bottom: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0
|
||||||
|
},
|
||||||
|
dpi: {
|
||||||
|
horizontal: 203,
|
||||||
|
vertical: 203
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
electron.app.on("window-all-closed", () => {
|
||||||
|
if (process.platform !== "darwin")
|
||||||
|
electron.app.quit();
|
||||||
|
});
|
||||||
|
|
|
||||||
|
|
@ -29,10 +29,10 @@ export function orderorderDetail(params) {
|
||||||
* @param {*} params
|
* @param {*} params
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export function payreturnOrder(data) {
|
export function payreturnOrder(data, pwd) {
|
||||||
return request({
|
return request({
|
||||||
method: "post",
|
method: "post",
|
||||||
url: "pay/returnOrder",
|
url: `pay/returnOrder?pwd=${pwd}`,
|
||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="t1" v-else>
|
<div class="t1" v-else>
|
||||||
<span class="title">会员:</span>
|
<span class="title">会员:</span>
|
||||||
<span class="num">{{ props.userInfo.id && props.userInfo.telephone }}</span>
|
<span class="num">{{
|
||||||
|
props.userInfo.id && props.userInfo.telephone
|
||||||
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="t2">
|
<div class="t2">
|
||||||
<span>已付:¥0.00</span>
|
<span>已付:¥0.00</span>
|
||||||
|
|
@ -23,8 +25,13 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="number_wrap">
|
<div class="number_wrap">
|
||||||
<div class="menus">
|
<div class="menus">
|
||||||
<div class="item" :class="{ active: payActive == index }" v-for="(item, index) in payList" :key="item.id"
|
<div
|
||||||
@click="payTypeChange(index, item)">
|
class="item"
|
||||||
|
:class="{ active: payActive == index }"
|
||||||
|
v-for="(item, index) in payList"
|
||||||
|
:key="item.id"
|
||||||
|
@click="payTypeChange(index, item)"
|
||||||
|
>
|
||||||
<div class="icon">
|
<div class="icon">
|
||||||
<el-image :src="item.icon" class="img"></el-image>
|
<el-image :src="item.icon" class="img"></el-image>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -39,7 +46,12 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="keybord_wrap">
|
<div class="keybord_wrap">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<div class="item" v-for="item in 9" :key="item" @click="amountInput(`${item}`)">
|
<div
|
||||||
|
class="item"
|
||||||
|
v-for="item in 9"
|
||||||
|
:key="item"
|
||||||
|
@click="amountInput(`${item}`)"
|
||||||
|
>
|
||||||
{{ item }}
|
{{ item }}
|
||||||
</div>
|
</div>
|
||||||
<div class="item" @click="amountInput('.')">.</div>
|
<div class="item" @click="amountInput('.')">.</div>
|
||||||
|
|
@ -57,30 +69,50 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<scanModal ref="scanModalRef" fast :amount="money" :selecttype="props.type" :orderId="props.userInfo.id"
|
<scanModal
|
||||||
@success="scanCodeSuccess" />
|
ref="scanModalRef"
|
||||||
|
fast
|
||||||
|
:amount="money"
|
||||||
|
:selecttype="props.type"
|
||||||
|
:orderId="props.userInfo.id"
|
||||||
|
@success="scanCodeSuccess"
|
||||||
|
/>
|
||||||
|
<takeFoodCode
|
||||||
|
ref="takeFoodCodeRef"
|
||||||
|
title="支付密码"
|
||||||
|
type="password"
|
||||||
|
placeholder="请输入支付密码"
|
||||||
|
@success="passwordSuccess"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { onMounted, ref } from "vue";
|
import { onMounted, ref } from "vue";
|
||||||
import { queryPayType, quickPay } from "@/api/pay";
|
import { queryPayType, quickPay } from "@/api/pay";
|
||||||
import { queryMembermember, createMembermember, membermemberScanPay, accountPaymember } from '@/api/member/index.js'
|
import {
|
||||||
|
queryMembermember,
|
||||||
|
createMembermember,
|
||||||
|
membermemberScanPay,
|
||||||
|
accountPaymember,
|
||||||
|
} from "@/api/member/index.js";
|
||||||
import { useUser } from "@/store/user.js";
|
import { useUser } from "@/store/user.js";
|
||||||
import { clearNoNum } from "@/utils";
|
import { clearNoNum } from "@/utils";
|
||||||
|
|
||||||
import scanModal from "@/components/payCard/scanModal.vue";
|
import scanModal from "@/components/payCard/scanModal.vue";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
|
import takeFoodCode from "@/components/takeFoodCode.vue";
|
||||||
|
const takeFoodCodeRef = ref(null);
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
type: {
|
type: {
|
||||||
type: [String, Number],
|
type: [String, Number],
|
||||||
default: 0 // 1快捷收银 2会员支付
|
default: 0, // 1快捷收银 2会员支付
|
||||||
},
|
},
|
||||||
userInfo: {
|
userInfo: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: {}
|
default: {},
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
|
|
||||||
const store = useUser();
|
const store = useUser();
|
||||||
|
|
||||||
|
|
@ -115,9 +147,28 @@ function payTypeChange(index, item) {
|
||||||
payActive.value = index;
|
payActive.value = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取支付密码
|
||||||
|
async function passwordSuccess(e) {
|
||||||
|
try {
|
||||||
|
payLoading.value = true;
|
||||||
|
await accountPaymember({
|
||||||
|
shopId: store.userInfo.shopId,
|
||||||
|
memberId: props.userInfo.id,
|
||||||
|
amount: money.value,
|
||||||
|
pwd: e,
|
||||||
|
});
|
||||||
|
payLoading.value = false;
|
||||||
|
ElMessage.success("支付成功");
|
||||||
|
emit("paySuccess");
|
||||||
|
} catch (error) {
|
||||||
|
payLoading.value = false;
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 结算支付
|
// 结算支付
|
||||||
async function confirmOrder() {
|
async function confirmOrder() {
|
||||||
if (payLoading.value) return
|
if (payLoading.value) return;
|
||||||
try {
|
try {
|
||||||
if (payList.value[payActive.value].payType == "scanCode") {
|
if (payList.value[payActive.value].payType == "scanCode") {
|
||||||
if (money.value <= 0) {
|
if (money.value <= 0) {
|
||||||
|
|
@ -130,29 +181,26 @@ async function confirmOrder() {
|
||||||
ElMessage.error("请输入大于0的金额");
|
ElMessage.error("请输入大于0的金额");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
payLoading.value = true;
|
|
||||||
switch (payList.value[payActive.value].payType) {
|
switch (payList.value[payActive.value].payType) {
|
||||||
case "cash": //现金
|
case "cash": //现金
|
||||||
if (props.type == 0) {
|
if (props.type == 0) {
|
||||||
|
payLoading.value = true;
|
||||||
await quickPay({
|
await quickPay({
|
||||||
amount: money.value,
|
amount: money.value,
|
||||||
authCode: "",
|
authCode: "",
|
||||||
payType: payList.value[payActive.value].payType,
|
payType: payList.value[payActive.value].payType,
|
||||||
});
|
});
|
||||||
|
payLoading.value = false;
|
||||||
|
ElMessage.success("支付成功");
|
||||||
|
emit("paySuccess");
|
||||||
} else {
|
} else {
|
||||||
await accountPaymember({
|
// 会员充值
|
||||||
shopId: store.userInfo.shopId,
|
takeFoodCodeRef.value.show();
|
||||||
memberId: props.userInfo.id,
|
|
||||||
amount: money.value
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
payLoading.value = false;
|
|
||||||
ElMessage.success("支付成功");
|
|
||||||
emit("paySuccess");
|
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|
@ -337,7 +385,9 @@ onMounted(() => {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr 1fr;
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
grid-template-rows: var(--item-height) var(--item-height) var(--item-height) var(--item-height);
|
grid-template-rows: var(--item-height) var(--item-height) var(--item-height) var(
|
||||||
|
--item-height
|
||||||
|
);
|
||||||
gap: var(--el-font-size-base);
|
gap: var(--el-font-size-base);
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
|
|
|
||||||
|
|
@ -1,74 +1,78 @@
|
||||||
<!-- 取餐号组件 -->
|
<!-- 取餐号组件 -->
|
||||||
<template>
|
<template>
|
||||||
<el-dialog :title="props.title" width="600" v-model="dialogVisible" @open="opne">
|
<el-dialog :title="props.title" width="600" v-model="dialogVisible" @open="opne">
|
||||||
<el-input v-model="number" :placeholder="props.placeholder" readonly></el-input>
|
<el-input :type="props.type" v-model="number" :placeholder="props.placeholder" readonly></el-input>
|
||||||
<div class="keybord_wrap">
|
<div class="keybord_wrap">
|
||||||
<div v-for="item in 9" :key="item">
|
<div v-for="item in 9" :key="item">
|
||||||
<el-button plain type="info" style="width: 100%;" @click="inputHandle(item)">{{ item }}</el-button>
|
<el-button plain type="info" style="width: 100%" @click="inputHandle(item)">{{ item }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button plain type="info" disabled style="width: 100%;">.</el-button>
|
<el-button plain type="info" disabled style="width: 100%">.</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button plain type="info" style="width: 100%;" @click="inputHandle(0)">0</el-button>
|
<el-button plain type="info" style="width: 100%" @click="inputHandle(0)">0</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button plain type="info" icon="CloseBold" style="width: 100%;" @click="delHandle"></el-button>
|
<el-button plain type="info" icon="CloseBold" style="width: 100%" @click="delHandle"></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<el-button type="primary" style="width: 100%;" @click="confirmHandle">确认</el-button>
|
<el-button type="primary" style="width: 100%" @click="confirmHandle">确认</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from "vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
default: "text",
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '标题'
|
default: "标题",
|
||||||
},
|
},
|
||||||
placeholder: {
|
placeholder: {
|
||||||
type: String,
|
type: String,
|
||||||
default: '提示'
|
default: "提示",
|
||||||
}
|
},
|
||||||
})
|
});
|
||||||
|
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false);
|
||||||
const number = ref('')
|
const number = ref("");
|
||||||
|
|
||||||
const emit = defineEmits(['success'])
|
const emit = defineEmits(["success"]);
|
||||||
|
|
||||||
function show() {
|
function show() {
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function opne() {
|
function opne() {
|
||||||
number.value = ''
|
number.value = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
// 输入
|
// 输入
|
||||||
function inputHandle(n) {
|
function inputHandle(n) {
|
||||||
number.value += n
|
number.value += n;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
function delHandle() {
|
function delHandle() {
|
||||||
if (!number.value) return
|
if (!number.value) return;
|
||||||
number.value = number.value.substring(0, number.value.length - 1)
|
number.value = number.value.substring(0, number.value.length - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 确认
|
// 确认
|
||||||
function confirmHandle() {
|
function confirmHandle() {
|
||||||
emit('success', number.value)
|
emit("success", number.value);
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
show
|
show,
|
||||||
})
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
@ -88,4 +92,4 @@ defineExpose({
|
||||||
height: 60px;
|
height: 60px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue