dingdong-master/pages/area-proxy/modal/set-take-rate.vue

75 lines
1.9 KiB
Vue
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<!-- 设置扣点模态框 -->
<view class="cu-modal" :class="isShow?'show':''">
<view class="cu-dialog">
<view class="cu-bar bg-white justify-end">
<view class="content">设置扣点</view>
<view class="action" @tap="hideModal">
<text class="cuIcon-close text-red"></text>
</view>
</view>
<view class="padding-xl">
<view>设置区域代理扣点可按百分比扣取或金额扣取的方式建议二选一进行申请</view>
<view class="flex justify-center align-center margin-top-sm">
<text>扣点</text>
<input class="radius-input" type="number" placeholder="请输入订单扣取的比例" v-model="rate"></input>
<text>%</text>
</view>
<view class="flex justify-center align-center margin-top-sm">
<text>金额</text>
<input class="radius-input" type="number" placeholder="请输入按单扣取的金额" v-model="amount"></input>
<text></text>
</view>
</view>
<view class="cu-bar bg-white">
<view class="action margin-0 flex-sub text-black" @tap="hideModal">取消</view>
<view class="action margin-0 flex-sub text-main-color solid-left" @tap="hideModal"
@click="confirm">提交申请</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'set-take-rate',
emits: ['confirm'],
props: {
leaderTeamRate: {
type: String,
default: ""
},
leaderTeamMoney: {
type: String,
default: ""
}
},
data() {
return {
isShow: false,
rate: '',
amount: ''
}
},
methods: {
showModal(e) {
this.isShow = true;
this.rate = this.leaderTeamRate ? this.leaderTeamRate : '';
this.amount = this.leaderTeamMoney ? this.leaderTeamMoney : '';
},
hideModal(e) {
this.isShow = false;
},
confirm() {
this.$emit('confirm', {
leaderTeamRate: this.rate ? this.rate/100 : 0,
leaderTeamMoney: this.amount
});
}
}
}
</script>
<style>
</style>