增加部分公共样式

修改部分公共组件代码
修改台桌,代课下单逻辑代码
增加支付页面
修改用户列表页面
This commit is contained in:
2024-09-09 17:45:19 +08:00
parent da5f7ca916
commit 34853b8783
31 changed files with 1182 additions and 99 deletions

View File

@@ -78,12 +78,17 @@
import {
reactive,
nextTick,
ref
ref,
watch
} from 'vue';
import myModel from '@/components/my-components/my-model.vue'
import myButton from '@/components/my-components/my-button.vue'
import myTabs from '@/components/my-components/my-tabs.vue'
const props = defineProps({
price: {
type: [Number,String],
default: 0
},
title: {
type: String,
default: ''
@@ -93,7 +98,9 @@
default: []
}
})
function changeCauses(item) {
item.checked = !item.checked
}
@@ -151,7 +158,11 @@
const form = reactive({
...$form
})
watch(()=>props.price,(newval)=>{
console.log(newval);
form.price=newval
form.currentPrice=newval
})
function resetForm() {
Object.assign(form, {
...$form

View File

@@ -1,170 +0,0 @@
<template>
<my-model ref="model" :title="title" iconColor="#000" @close="resetForm">
<template #desc>
<view class="u-text-left u-p-30 color-666">
<view class="u-m-t-32 u-flex ">
<view>应付金额</view>
<view class="u-m-l-32">
{{form.price}}
</view>
</view>
<view class="u-m-t-40 u-flex ">
<view>应付金额</view>
<view class="u-m-l-32 border-bottom u-flex-1">
<uni-easyinput style="digit" @input="currentPriceChange" paddingNone :inputBorder="false" v-model="form.currentPrice"
placeholder="输入实际金额"></uni-easyinput>
</view>
</view>
<view class="u-m-t-54 u-flex ">
<view>优惠折扣</view>
<view class="u-m-l-32 u-flex-1 u-flex border-bottom">
<view class="u-flex-1">
<uni-easyinput @input="discountChange" style="digit" paddingNone :inputBorder="false" v-model="form.discount"
placeholder="输入折扣"></uni-easyinput>
</view>
<view class="u-font-32 color-333">%</view>
</view>
</view>
</view>
</template>
<template #btn>
<view class="u-p-30">
<view class="u-m-t-10">
<my-button @tap="confirm" shape="circle" showShadow>修改</my-button>
<my-button type="cancel" bgColor="#fff" >取消</my-button>
</view>
</view>
</template>
</my-model>
</template>
<script setup>
import {
reactive,
nextTick,
ref
} from 'vue';
import myModel from '@/components/my-components/my-model.vue'
import myButton from '@/components/my-components/my-button.vue'
import myTabs from '@/components/my-components/my-tabs.vue'
const props = defineProps({
title: {
type: String,
default: ''
},
data: {
type: Array,
default: []
},
price:{
type:Number,
default:0
}
})
function currentPriceChange(newval){
nextTick(()=>{
form.discount=(newval*100/form.price).toFixed()
})
}
function discountChange(newval){
nextTick(()=>{
form.currentPrice=(form.price*newval/100).toFixed(2)
})
}
const $form = {
price:props.price,
currentPrice: props.price,
discount: 100
}
const form = reactive({
...$form
})
function resetForm() {
Object.assign(form, {
...$form
})
}
const model = ref(null)
function open() {
model.value.open()
}
function close() {
model.value.close()
}
const emits = defineEmits(['confirm'])
function confirm() {
const {
price,
} = form
close()
emits('confirm',form)
}
defineExpose({
open,
close
})
</script>
<style lang="scss">
.lh34 {
line-height: 34rpx;
}
.tag {
background-color: #fff;
border: 1px solid #E5E5E5;
line-height: inherit;
font-size: 24rpx;
color: #666666;
padding: 6rpx 20rpx;
border-radius: 8rpx;
&.active {
border-color: #E6F0FF;
color: $my-main-color;
}
}
.hover-class {
background-color: #E5E5E5;
}
.discount {
.u-absolute {
top: 0;
bottom: 0;
right: 0;
}
}
.bg1 {
background: #F7F7FA;
}
.tab {
padding: 0 80rpx;
}
.border {
border: 1px solid #E5E5E5;
border-radius: 4rpx;
}
.input-box {
padding: 22rpx 32rpx;
font-size: 28rpx;
color: #666;
}
.placeholder-class {
font-size: 28rpx;
}
</style>