|
|
@@ -161,6 +161,8 @@
|
|
|
<text>合计金额</text>
|
|
|
</view>
|
|
|
<text style="color: #3385FF">¥{{parseFloat(finalPrice)}}</text>
|
|
|
+ <button @tap="showDiscount()" class="admin-button-com mini-btn default" style="margin-left:30upx;">点击打折</button>
|
|
|
+ <text v-if="discountValue>0">{{ Number(discountValue)*10 }}折</text>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="false" >
|
|
|
@@ -169,7 +171,6 @@
|
|
|
<input style="border:1upx solid #eee;color:#3385FF;width:150upx;height:70upx;" type="digit" @focus="modifyPrice=''" v-model="modifyPrice" placeholder-class="tui-placeholder"/>
|
|
|
<text v-if="modifyPrice > 0 && modifyPrice > finalPrice" style="font-size:25upx;margin-left:20upx;color:red;">人工资材费 ¥{{parseFloat((modifyPrice-finalPrice).toFixed(2))}}</text>
|
|
|
<text v-if="modifyPrice > 0 && modifyPrice < finalPrice" style="font-size:25upx;margin-left:20upx;color:green;">优惠 ¥{{parseFloat((finalPrice-modifyPrice).toFixed(2))}}</text>
|
|
|
- <text @tap="setDiscount()" style="font-size:25upx;margin-left:20upx;">点击打8折</text>
|
|
|
</tui-list-cell>
|
|
|
|
|
|
<tui-list-cell class="line-cell" :hover="false" :arrow="true">
|
|
|
@@ -239,6 +240,15 @@
|
|
|
|
|
|
<view v-if="getMyShopInfo && getMyShopInfo.scan == 1" @click="beginScan()" style="width:120upx;height:120upx;position:fixed;bottom:150upx;right:30upx;background-color:#3385FF;color:white;border-radius:60upx;text-align:center;line-height:120upx;">扫码</view>
|
|
|
|
|
|
+ <uni-popup ref="discountRef" background-color="#fff" type="center" :animation="false" class="class-popup-style">
|
|
|
+ <view style="display:flex;padding:20upx;min-height:25vh;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:25upx;border:1upx solid #999999;width:100upx;height:100upx;border-radius:20upx;justify-content:center;align-items:center;display:flex;">
|
|
|
+ {{item.name}}
|
|
|
+ </text>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -276,6 +286,8 @@ export default {
|
|
|
mixins: [productMins],
|
|
|
data () {
|
|
|
return {
|
|
|
+ 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}],
|
|
|
+ discountValue:0,
|
|
|
autoLoad: false,
|
|
|
staffList:[],
|
|
|
payWayList:[{name:"线下微信",id:0},{name:"线下支付宝",id:1},{name:"现金",id:4},{name:"银行卡",id:5}],
|
|
|
@@ -442,10 +454,15 @@ export default {
|
|
|
let date = e.detail.value
|
|
|
this.form.sendTimeWant = date
|
|
|
},
|
|
|
- setDiscount(){
|
|
|
- let price = Number(this.finalPrice)*0.8
|
|
|
+ showDiscount(){
|
|
|
+ this.$refs.discountRef.open('center')
|
|
|
+ },
|
|
|
+ setDiscount(num){
|
|
|
+ this.discountValue = Number(num)
|
|
|
+ let price = Number(this.finalPrice)*Number(num)
|
|
|
price = parseFloat(price.toFixed(2))
|
|
|
this.modifyPrice = price
|
|
|
+ this.$refs.discountRef.close()
|
|
|
},
|
|
|
beginScan(){
|
|
|
console.log('beginScan')
|