版本更新,折扣打印优化
This commit is contained in:
@@ -75,17 +75,20 @@ export default (data) => {
|
||||
<div style="margin-top: 6px;margin-bottom: 6px;width: 100%">
|
||||
<hr/>
|
||||
</div>
|
||||
<div style="margin-top: 6px; font-size: 22px;display:flex;justify-content: space-between;">
|
||||
<span>应收</span>
|
||||
<span>¥${data.discountAmount}</span>
|
||||
<div style="margin-top: 6px; font-size: 12px;display:flex;justify-content: space-between;">
|
||||
<span>原价</span>
|
||||
<span>${data.amount}</span>
|
||||
</div>
|
||||
<div style="margin-top: 4px; font-size: 12px;">
|
||||
<span>共计:</span>
|
||||
<span>¥${data.amount}</span>
|
||||
<span style="margin-left: 10px;">优惠:</span>
|
||||
<span>¥${formatDecimal(data.amount - data.discountAmount)}(${
|
||||
data.discount
|
||||
}折)</span>
|
||||
<div style="margin-top: 6px; font-size: 12px;display:flex;justify-content: space-between;">
|
||||
<span>折扣</span>
|
||||
<span>-${formatDecimal(data.amount - data.discountAmount)}</span>
|
||||
</div>
|
||||
<div style="margin-top: 6px;margin-bottom: 6px;width: 100%">
|
||||
<hr/>
|
||||
</div>
|
||||
<div style="margin-top: 6px; font-size: 22px;display:flex;justify-content: space-between;">
|
||||
<span>实付</span>
|
||||
<span>¥${data.discountAmount}</span>
|
||||
</div>
|
||||
<div style="margin-top: 6px;margin-bottom: 6px;width: 100%">
|
||||
<hr/>
|
||||
|
||||
@@ -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()
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user