|
|
@@ -64,6 +64,16 @@
|
|
|
<view class="line"></view>
|
|
|
<view class="select-right">
|
|
|
|
|
|
+ <view style="position: absolute;background-color: white;z-index: 99999999;" v-if="showDiscount">
|
|
|
+ <view style="display:flex;padding:20upx;justify-content: space-between;align-items:center;flex-wrap:wrap;">
|
|
|
+ <text v-for="(item, index) in discountList" :key="index" @click="setDiscount(item.value)"
|
|
|
+ style="margin-left:10upx;border:1upx solid #999999;font-size:11upx;
|
|
|
+ width:40upx;height:40upx;border-radius:20upx;justify-content:center;align-items:center;display:flex;">
|
|
|
+ {{item.name}}
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+
|
|
|
<view class="input-list">
|
|
|
<text>商品金额</text>
|
|
|
<text><text>{{allPrice}}</text></text>
|
|
|
@@ -79,7 +89,9 @@
|
|
|
</view>
|
|
|
<view class="input-list">
|
|
|
<text>总金额</text>
|
|
|
- <text @click="setDiscount()">点击打8折</text>
|
|
|
+ <text @click="viewDiscount()">
|
|
|
+ 点击打折<text v-if="Number(discountValue)>0 && Number(discountValue)<1">({{ Number(discountValue)*10 }}折)</text>
|
|
|
+ </text>
|
|
|
<text><text>{{totalPrice}}</text></text>
|
|
|
</view>
|
|
|
|
|
|
@@ -131,7 +143,10 @@ export default {
|
|
|
totalMoney: 0,
|
|
|
needPrintList:[ { name:'不需要', id:2 },{ name:'需要', id:1 } ],
|
|
|
getStaffList:[],
|
|
|
- shopAdminIdList:[]
|
|
|
+ shopAdminIdList:[],
|
|
|
+ discountList:[{name:'1折',value:0.1},{name:'2折',value:0.2},{name:'3折',value:0.3},{name:'4折',value:0.4},{name:'5折',value:0.5},{name:'6折',value:0.6},{name:'7折',value:0.7},{name:'8折',value:0.8},{name:'9折',value:0.9},{name:'不打折',value:1}],
|
|
|
+ discountValue:0,
|
|
|
+ showDiscount:false
|
|
|
};
|
|
|
},
|
|
|
props:{
|
|
|
@@ -222,10 +237,15 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
- setDiscount(){
|
|
|
- let price = Number(this.totalPrice)*0.8
|
|
|
- price = parseFloat(price.toFixed(2))
|
|
|
- this.form.modifyPrice = price
|
|
|
+ viewDiscount(){
|
|
|
+ this.showDiscount = true
|
|
|
+ },
|
|
|
+ setDiscount(num){
|
|
|
+ this.discountValue = Number(num)
|
|
|
+ let price = Number(this.totalPrice)*Number(num)
|
|
|
+ price = parseFloat(price.toFixed(2))
|
|
|
+ this.form.modifyPrice = price
|
|
|
+ this.showDiscount = false
|
|
|
},
|
|
|
changeShopAdminId(item){
|
|
|
this.form.shopAdminId = item.id
|