This commit is contained in:
gyq 2024-05-29 18:00:26 +08:00
parent 3b0e6513c7
commit c9dc11fa93
7 changed files with 19 additions and 14 deletions

View File

@ -1,7 +1,7 @@
{
"name": "vite-electron",
"private": true,
"version": "1.2.3",
"version": "1.2.5",
"main": "dist-electron/main.js",
"scripts": {
"dev": "chcp 65001 && vite",

View File

@ -7,7 +7,7 @@
</el-icon>
</div>
<div class="right">
<div class="t1" v-if="props.type == 1">
<div class="t1" v-if="props.type == 0">
<span class="title">应收:</span>
<span class="num">{{ money }}</span>
</div>
@ -57,7 +57,7 @@
</div>
</div>
</div>
<scanModal ref="scanModalRef" fast :amount="money" :selecttype="1" :orderId="props.userInfo.id"
<scanModal ref="scanModalRef" fast :amount="money" :selecttype="props.type" :orderId="props.userInfo.id"
@success="scanCodeSuccess" />
</template>
@ -74,7 +74,7 @@ import { ElMessage } from "element-plus";
const props = defineProps({
type: {
type: [String, Number],
default: 1 // 1 2
default: 0 // 1 2
},
userInfo: {
type: Object,
@ -129,7 +129,7 @@ async function confirmOrder() {
payLoading.value = true;
switch (payList.value[payActive.value].payType) {
case "cash": //
if (props.type == 1) {
if (props.type == 0) {
await quickPay({
amount: money.value,
authCode: "",

View File

@ -121,7 +121,7 @@ function payTypeChange(index, item) {
async function confirmOrder() {
if (payLoading.value) return
try {
if (payList.value[payActive.value].payType == 'scanCode' || payList.value[payActive.value].payType == 'deposit') {
if (payList.value[payActive.value].payType == 'scanCode') {
scanModalRef.value.show()
} else {
if (money.value < props.amount) return
@ -133,10 +133,15 @@ async function confirmOrder() {
// } else {
// }
await accountPay({
orderId: props.orderId,
memberId: props.member.id
})
if (props.member.id) {
await accountPay({
orderId: props.orderId,
memberId: props.member.id,
memberAccount: ''
})
} else {
scanModalRef.value.show()
}
break;
case 'cash'://
if (props.selecttype == 1) {

View File

@ -72,7 +72,7 @@ const props = defineProps({
default: 0,
},
selecttype: {
type: Number,
type: [Number, String],
default: 0,
},
orderId: {

View File

@ -114,7 +114,7 @@
<settleAccount ref="settleAccountRef" :cart="cartList" :amount="cartInfo.totalAmount" :remark="remark"
:masterId="masterId" :orderInfo="orderInfo" :member="memberInfo" @paySuccess="createCodeAjax(1)" />
<!-- 快捷收银 -->
<fastCashier ref="fastCashierRef" />
<fastCashier ref="fastCashierRef" type="0" />
<!-- 挂起订单 -->
<pendingCartModal ref="pendingCartModalRef" @select="pendingCartHandle" />
</template>

View File

@ -2,7 +2,7 @@
<el-drawer size="100%" :with-header="false" direction="btt" v-model="dialogVisible">
<div class="drawer_wrap">
<div class="pay_wrap">
<fastPayCard ref="fastPayCardRef" type="2" :userInfo="userInfo" @paySuccess="paySuccess"
<fastPayCard ref="fastPayCardRef" type="1" :userInfo="userInfo" @paySuccess="paySuccess"
@close="dialogVisible = false" />
</div>
</div>

View File

@ -12,7 +12,7 @@ export default defineConfig({
// target: 'http://192.168.2.96:10587/cashier-client', // 阿伟
// target: 'https://cashierclient.sxczgkj.cn/cashier-client', // 线上
// target: 'http://192.168.2.116:10587/cashier-client', // 国成
// target: 'http://192.168.2.171:10587/cashier-client', // 鹏辉
// target: 'http://192.168.2.41:10587/cashier-client', // 鹏辉
target: 'https://cashier-client.sxczgkj.cn/cashier-client', // 测试
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')