Merge branch 'ymf' of https://e.coding.net/g-cphe0354/cashier_front/cashier_admin_app into test
This commit is contained in:
commit
a37c89eb72
|
|
@ -40,7 +40,13 @@
|
||||||
<view class="line-th color-666 ">¥{{item.salePrice||item.price}}</view>
|
<view class="line-th color-666 ">¥{{item.salePrice||item.price}}</view>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<view>¥{{item.salePrice||item.price}}</view>
|
<template v-if="item.priceAmount<=0">
|
||||||
|
<view>¥0.00</view>
|
||||||
|
<view class="line-th color-666 ">¥{{returnTotalMoney(item)}}</view>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<view>¥{{item.priceAmount}}</view>
|
||||||
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<view class="u-m-t-22 color-999 u-font-24">X{{item.number||item.num}}</view>
|
<view class="u-m-t-22 color-999 u-font-24">X{{item.number||item.num}}</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -130,6 +136,9 @@
|
||||||
import color from '@/commons/color.js'
|
import color from '@/commons/color.js'
|
||||||
const emits = defineEmits(['tuicai', 'tuikuan', 'printOrder'])
|
const emits = defineEmits(['tuicai', 'tuikuan', 'printOrder'])
|
||||||
|
|
||||||
|
function returnTotalMoney(item){
|
||||||
|
return (item.price*item.num).toFixed(2)
|
||||||
|
}
|
||||||
function to2(n){
|
function to2(n){
|
||||||
if(!n){
|
if(!n){
|
||||||
return 0
|
return 0
|
||||||
|
|
@ -175,7 +184,7 @@
|
||||||
const goodsPrice = props.data.reduce((prve, cur) => {
|
const goodsPrice = props.data.reduce((prve, cur) => {
|
||||||
const curTotal = cur.info.filter(v => v.isGift !== "true" && v.status !== "return").reduce((a,
|
const curTotal = cur.info.filter(v => v.isGift !== "true" && v.status !== "return").reduce((a,
|
||||||
b) => {
|
b) => {
|
||||||
return a + (b.salePrice || b.price) * (b.number || b.num)
|
return a + b.priceAmount*1
|
||||||
}, 0)
|
}, 0)
|
||||||
return prve + curTotal
|
return prve + curTotal
|
||||||
}, 0)
|
}, 0)
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="u-flex u-flex-1 u-row-right">
|
<view class="u-flex u-flex-1 u-row-right">
|
||||||
<view>×{{item.num}}</view>
|
<view>×{{item.num}}</view>
|
||||||
<view class="u-text-right" :style="computedPriceStyle()">¥{{item.price}}</view>
|
<view class="u-text-right" :style="computedPriceStyle()">¥{{item.priceAmount}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue