版本更新,优化退款显示
This commit is contained in:
28489
dist-electron/main.js
28489
dist-electron/main.js
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "vite-electron",
|
||||
"private": true,
|
||||
"version": "2.0.23",
|
||||
"version": "2.0.25",
|
||||
"main": "dist-electron/main.js",
|
||||
"scripts": {
|
||||
"dev": "chcp 65001 && vite",
|
||||
|
||||
@@ -119,46 +119,20 @@ export const useGlobal = defineStore("global", {
|
||||
},
|
||||
],
|
||||
bizCodes: [
|
||||
{
|
||||
type: "freeln",
|
||||
label: "霸王餐",
|
||||
},
|
||||
{
|
||||
type: "cashIn",
|
||||
label: "现金充值",
|
||||
},
|
||||
{
|
||||
type: "wechatIn",
|
||||
label: "微信小程序充值",
|
||||
},
|
||||
{
|
||||
type: "alipayIn",
|
||||
label: "支付宝小程序充值",
|
||||
},
|
||||
{
|
||||
type: "awardIn",
|
||||
label: "充值奖励",
|
||||
},
|
||||
{
|
||||
type: "rechargeRefund",
|
||||
label: "充值退款",
|
||||
},
|
||||
{
|
||||
type: "orderPay",
|
||||
label: "订单消费",
|
||||
},
|
||||
{
|
||||
type: "orderRefund",
|
||||
label: "订单退款",
|
||||
},
|
||||
{
|
||||
type: "adminIn",
|
||||
label: "管理员充值",
|
||||
},
|
||||
{
|
||||
type: "adminOut",
|
||||
label: "管理员消费",
|
||||
},
|
||||
{ type: "cashIn", label: "会员充值" },
|
||||
{ type: "cashback", label: "消费返现" },
|
||||
{ type: "cashback_refund", label: "消费返现扣减" },
|
||||
{ type: "freeIn", label: "霸王餐充值" },
|
||||
{ type: "awardIn", label: "充值奖励" },
|
||||
{ type: "wechatIn", label: "微信小程序充值" },
|
||||
{ type: "alipayIn", label: "支付宝小程序充值" },
|
||||
{ type: "orderPay", label: "订单支付奖励" },
|
||||
{ type: "orderRefund", label: "订单退款" },
|
||||
{ type: "rechargeRefund", label: "充值退款" },
|
||||
{ type: "rechargeCashRefund", label: "会员现金退款" },
|
||||
{ type: "adminIn", label: "管理员手动增减余额" },
|
||||
{ type: "adminOut", label: "管理员退款充值" },
|
||||
{ type: "rechargeRedemption", label: "充值兑换码" }
|
||||
],
|
||||
refundType: [
|
||||
{
|
||||
|
||||
@@ -241,7 +241,9 @@ async function printOrderLable(isBefore = false) {
|
||||
let packFee = 0
|
||||
|
||||
data.cartList.forEach(item => {
|
||||
packFee += item.num - item.returnNum * item.packAmount
|
||||
if (item.packNumber > 0 && (item.num - item.returnNum) >= item.packNumber) {
|
||||
packFee += (item.num - item.returnNum) * item.packAmount
|
||||
}
|
||||
})
|
||||
|
||||
if (packFee > 0 && isBefore) {
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<div class="left">
|
||||
<span>台桌:{{ goodsStore.tableInfo.name }}</span>
|
||||
<div class="n" @click="takeFoodCodeRef.show()">
|
||||
{{ goodsStore.tableInfo.num || 1 }}人
|
||||
{{ goodsStore.tableInfo.num || 0 }}人
|
||||
<el-icon>
|
||||
<EditPen />
|
||||
</el-icon>
|
||||
|
||||
@@ -56,6 +56,14 @@
|
||||
¥{{ formatDecimal(+scope.row.payAmount) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已退数量">
|
||||
<template v-slot="scope">
|
||||
<div class="column">
|
||||
<div class="row">退单数量:{{ scope.row.refundNum }}</div>
|
||||
<div class="row">退菜数量:{{ scope.row.returnNum }}</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="退款数量" width="170">
|
||||
<template v-slot="scope">
|
||||
<el-input-number v-model="scope.row.refund_number" :disabled="refundType != 2" :min="0"
|
||||
@@ -65,7 +73,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<template v-if="item.returnGoods.length">
|
||||
<!-- <template v-if="item.returnGoods.length">
|
||||
<div class="tips" style="margin-top: 20px;padding-bottom: 10px;">以下为已退部分退单/退菜</div>
|
||||
<el-table :data="item.returnGoods" brder stripe>
|
||||
<el-table-column label="商品信息">
|
||||
@@ -97,7 +105,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</template>
|
||||
</template> -->
|
||||
<div class="ipt">
|
||||
<el-input type="textarea" :rows="4" v-model="remark" placeholder="请输入退单原因" />
|
||||
</div>
|
||||
@@ -349,15 +357,22 @@ function show(row) {
|
||||
// 可退的最大数量,下单数量 - 已退数量 - 退菜数量
|
||||
let refundMaxNum = item.num - item.refundNum - item.returnNum
|
||||
|
||||
if (refundMaxNum <= 0) {
|
||||
item.refund_number = item.num
|
||||
// 已经退过,不在允许操作
|
||||
returnGoods.push(item)
|
||||
} else {
|
||||
// 可以操作的退款数量
|
||||
item.refund_number = item.num
|
||||
onGoods.push(item)
|
||||
}
|
||||
// if (refundMaxNum <= 0) {
|
||||
// item.refund_number = item.num
|
||||
// // 已经退过,不在允许操作
|
||||
// returnGoods.push(item)
|
||||
// } else {
|
||||
// // 可以操作的退款数量
|
||||
// item.refund_number = item.num
|
||||
// onGoods.push(item)
|
||||
// }
|
||||
item.refund_number = refundMaxNum
|
||||
// if (item.refundNum > 0 || item.returnNum > 0) {
|
||||
// // 已经退过,不在允许操作
|
||||
// returnGoods.push(item)
|
||||
// }
|
||||
// 可以操作的退款数量
|
||||
onGoods.push(item)
|
||||
})
|
||||
|
||||
newRow.onGoods = onGoods
|
||||
@@ -365,6 +380,8 @@ function show(row) {
|
||||
|
||||
item.value = newRow
|
||||
|
||||
console.log('item.value===', item.value);
|
||||
|
||||
setTimeout(() => {
|
||||
tableRef.value.clearSelection()
|
||||
refundTypeChange(1)
|
||||
|
||||
Reference in New Issue
Block a user