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", "name": "vite-electron",
"private": true, "private": true,
"version": "1.2.3", "version": "1.2.5",
"main": "dist-electron/main.js", "main": "dist-electron/main.js",
"scripts": { "scripts": {
"dev": "chcp 65001 && vite", "dev": "chcp 65001 && vite",

View File

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

View File

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

View File

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

View File

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

View File

@ -2,7 +2,7 @@
<el-drawer size="100%" :with-header="false" direction="btt" v-model="dialogVisible"> <el-drawer size="100%" :with-header="false" direction="btt" v-model="dialogVisible">
<div class="drawer_wrap"> <div class="drawer_wrap">
<div class="pay_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" /> @close="dialogVisible = false" />
</div> </div>
</div> </div>

View File

@ -12,7 +12,7 @@ export default defineConfig({
// target: 'http://192.168.2.96:10587/cashier-client', // 阿伟 // target: 'http://192.168.2.96:10587/cashier-client', // 阿伟
// target: 'https://cashierclient.sxczgkj.cn/cashier-client', // 线上 // target: 'https://cashierclient.sxczgkj.cn/cashier-client', // 线上
// target: 'http://192.168.2.116:10587/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', // 测试 target: 'https://cashier-client.sxczgkj.cn/cashier-client', // 测试
changeOrigin: true, changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '') rewrite: (path) => path.replace(/^\/api/, '')