版本更新,折扣打印优化

This commit is contained in:
gyq
2024-08-28 09:53:27 +08:00
parent fbfee69b25
commit 3047fe0404
8 changed files with 85 additions and 50 deletions

View File

@@ -6,10 +6,10 @@
<span class="num">{{ money }}</span>
</div>
<div class="t2">
<span>共计{{ props.amount }}</span>
<span>原价{{ formatDecimal(props.amount) }}</span>
<span style="margin-left: 20px;">优惠{{ formatDecimal(props.amount - money) }}</span>
<span v-if="props.discount" @click="cancelDiscount">{{ formatDecimal(props.discount * 10, 1, true) }}
<el-icon>
<span style="margin-left: 20px;" v-if="props.discount" @click="cancelDiscount">折扣{{ formatDecimal(props.discount * 10, 1, true) }}
<el-icon style="margin-left: 6px;">
<CircleClose />
</el-icon>
</span>
@@ -124,7 +124,7 @@ const money = ref('0')
const scanModalRef = ref(null)
watch(props, (value) => {
money.value = `${props.amount}`
money.value = `${formatDecimal(props.amount)}`
if (props.discount > 0) {
money.value = `${formatDecimal(props.amount * props.discount)}`
}
@@ -334,7 +334,7 @@ function cancelDiscount() {
}
onMounted(() => {
money.value = `${props.amount}`
money.value = `${formatDecimal(props.amount)}`
queryPayTypeAjax()
})