|
@@ -97,7 +97,7 @@
|
|
|
<!--<view class="flex list-title" @tap="selectProduct(i)">-->
|
|
<!--<view class="flex list-title" @tap="selectProduct(i)">-->
|
|
|
<view class="flex list-title" >
|
|
<view class="flex list-title" >
|
|
|
<!--<view class="flex-center radioBtn" :class="res.isActive?'active':''"></view>-->
|
|
<!--<view class="flex-center radioBtn" :class="res.isActive?'active':''"></view>-->
|
|
|
- {{res.name}} {{ `${res.bigNum}/${res.smallNum}` }} {{`¥${res.price}`}}
|
|
|
|
|
|
|
+ {{res.name}} {{ `${res.bigNum}/${res.smallNum}` }} 单价 {{`¥${res.discountPrice}`}}
|
|
|
</view>
|
|
</view>
|
|
|
<view class="flex list-val">
|
|
<view class="flex list-val">
|
|
|
<input type="number" @blur="inputFun" v-model="res.big"><text>扎</text>
|
|
<input type="number" @blur="inputFun" v-model="res.big"><text>扎</text>
|
|
@@ -164,20 +164,14 @@ export default {
|
|
|
},
|
|
},
|
|
|
computed:{
|
|
computed:{
|
|
|
refundMoneyFun(){
|
|
refundMoneyFun(){
|
|
|
- // if(!this.isMonitor){return;}
|
|
|
|
|
this.refundPrice = 0
|
|
this.refundPrice = 0
|
|
|
if(!this.$util.isEmpty(this.product)){
|
|
if(!this.$util.isEmpty(this.product)){
|
|
|
this.product.forEach(ele=>{
|
|
this.product.forEach(ele=>{
|
|
|
- let unitPrice = ele.unitPrice; //单价
|
|
|
|
|
|
|
+ let unitPrice = ele.discountPrice; //单价
|
|
|
let big = ele.big * unitPrice; //输入的扎
|
|
let big = ele.big * unitPrice; //输入的扎
|
|
|
- let ratio = ele.ratio==0?1:ele.ratio; //比例
|
|
|
|
|
- let small = (ele.small/ratio * unitPrice).toFixed(2); //输入的支
|
|
|
|
|
-
|
|
|
|
|
- // if(ele.isActive){}
|
|
|
|
|
|
|
+ let small = (ele.small * ele.discountSmallPrice).toFixed(2); //输入的支
|
|
|
this.refundPrice = (Number(this.refundPrice) + big + Number(small)).toFixed(2);
|
|
this.refundPrice = (Number(this.refundPrice) + big + Number(small)).toFixed(2);
|
|
|
-
|
|
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
}
|
|
}
|
|
|
this.refundMoney = this.refundPrice
|
|
this.refundMoney = this.refundPrice
|
|
|
},
|
|
},
|
|
@@ -234,7 +228,6 @@ export default {
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
inputFun(e){
|
|
inputFun(e){
|
|
|
- // this.isMonitor = false
|
|
|
|
|
this.product.forEach(ele=>{
|
|
this.product.forEach(ele=>{
|
|
|
if(Number(ele.big)>Number(ele.bigNum)){
|
|
if(Number(ele.big)>Number(ele.bigNum)){
|
|
|
uni.showToast({title:'不能大于总数量',icon:'none'})
|
|
uni.showToast({title:'不能大于总数量',icon:'none'})
|
|
@@ -247,7 +240,6 @@ export default {
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
selectProduct(index){
|
|
selectProduct(index){
|
|
|
- // this.isMonitor = true
|
|
|
|
|
this.product[index].isActive = !this.product[index].isActive;
|
|
this.product[index].isActive = !this.product[index].isActive;
|
|
|
},
|
|
},
|
|
|
async init() {
|
|
async init() {
|