优化
This commit is contained in:
@@ -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: "",
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -72,7 +72,7 @@ const props = defineProps({
|
||||
default: 0,
|
||||
},
|
||||
selecttype: {
|
||||
type: Number,
|
||||
type: [Number, String],
|
||||
default: 0,
|
||||
},
|
||||
orderId: {
|
||||
|
||||
Reference in New Issue
Block a user