完成新客立减功能
This commit is contained in:
@@ -1,10 +1,13 @@
|
||||
<template>
|
||||
<view>
|
||||
<view style="height: 180rpx"></view>
|
||||
<view class="zhanwei" :class="[direction == 'column' ? 'zhanwei1' : '']"></view>
|
||||
|
||||
<view class="fixed-bottom u-flex gap-20">
|
||||
<view
|
||||
class="fixed-bottom u-flex gap-20"
|
||||
:class="[direction == 'column' ? 'u-flex-column' : '']"
|
||||
>
|
||||
<view class="u-flex-1">
|
||||
<my-button type="primary" @click="save" shape="circle">
|
||||
<my-button type="primary" @click="save" shape="circle">
|
||||
保存
|
||||
</my-button>
|
||||
</view>
|
||||
@@ -18,7 +21,15 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const emit= defineEmits(["save", "cancel"]);
|
||||
const emit = defineEmits(["save", "cancel"]);
|
||||
|
||||
const props = defineProps({
|
||||
//方向 row横向布局 column 纵向布局
|
||||
direction: {
|
||||
type: String,
|
||||
default: "row",
|
||||
},
|
||||
});
|
||||
|
||||
function save() {
|
||||
emit("save");
|
||||
@@ -27,3 +38,12 @@ function cancel() {
|
||||
emit("cancel");
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.zhanwei {
|
||||
height: 180rpx;
|
||||
}
|
||||
.zhanwei1{
|
||||
height: 240rpx;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,39 +1,57 @@
|
||||
<template>
|
||||
<view>
|
||||
<up-checkbox-group v-model="useType" placement="row" shape="square" size="28rpx">
|
||||
<up-checkbox v-for="item in dinetyps" :key="item.value" :name="item.value" :label="item.label" :customStyle="customStyle"></up-checkbox>
|
||||
</up-checkbox-group>
|
||||
</view>
|
||||
<view>
|
||||
<up-checkbox-group
|
||||
v-model="useType"
|
||||
placement="row"
|
||||
shape="square"
|
||||
size="28rpx"
|
||||
>
|
||||
<up-checkbox
|
||||
v-for="item in dinetyps"
|
||||
:key="item.value"
|
||||
:name="item.value"
|
||||
:label="item.label"
|
||||
:customStyle="radioCustomStyle"
|
||||
></up-checkbox>
|
||||
</up-checkbox-group>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { ref } from "vue";
|
||||
|
||||
|
||||
const customStyle = ref({
|
||||
marginRight: '15px'
|
||||
});
|
||||
|
||||
// 可使用类型:dine堂食/pickup自取/deliv配送/express快递
|
||||
const dinetyps = [
|
||||
{
|
||||
value: 'dine-in',
|
||||
label: '堂食'
|
||||
},
|
||||
{
|
||||
value: 'take-out',
|
||||
label: '自取'
|
||||
},
|
||||
{
|
||||
value: 'post',
|
||||
label: '配送'
|
||||
},
|
||||
{
|
||||
value: 'take-away',
|
||||
label: '快递'
|
||||
}
|
||||
{
|
||||
value: "dine-in",
|
||||
label: "堂食",
|
||||
},
|
||||
{
|
||||
value: "take-out",
|
||||
label: "自取",
|
||||
},
|
||||
{
|
||||
value: "post",
|
||||
label: "配送",
|
||||
},
|
||||
{
|
||||
value: "take-away",
|
||||
label: "快递",
|
||||
},
|
||||
];
|
||||
|
||||
const props = defineProps({
|
||||
radioCustomStyle: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return { marginRight: "15px" };
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const useType = defineModel({
|
||||
default: () => [],
|
||||
type: Array
|
||||
default: () => [],
|
||||
type: Array,
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
<view>
|
||||
<view class="u-flex">
|
||||
<view class="item" @click="pirckerShow(startDate, 'startDate')">
|
||||
<text class="u-m-r-12" v-if="!startDate">请选择日期范围</text>
|
||||
<text class="u-m-r-12" v-if="!startDate">{{ startText }}</text>
|
||||
<text class="u-m-r-12" v-else>{{ startDate }}</text>
|
||||
<up-icon name="arrow-down" size="14"></up-icon>
|
||||
</view>
|
||||
<view class="u-m-l-8 u-m-r-8">—</view>
|
||||
<view class="item" @click="pirckerShow(endDate, 'endDate')">
|
||||
<text class="u-m-r-12" v-if="!endDate">请选择日期范围</text>
|
||||
<text class="u-m-r-12" v-if="!endDate">{{ endText }}</text>
|
||||
<text class="u-m-r-12" v-else>{{ endDate }}</text>
|
||||
<up-icon name="arrow-down" size="14"></up-icon>
|
||||
</view>
|
||||
@@ -29,6 +29,16 @@
|
||||
<script setup>
|
||||
import { computed, ref } from "vue";
|
||||
import dayjs from "dayjs";
|
||||
const props=defineProps({
|
||||
startText: {
|
||||
type: String,
|
||||
default: "请选择开始时间",
|
||||
},
|
||||
endText: {
|
||||
type: String,
|
||||
default: "请选择结束时间",
|
||||
},
|
||||
});
|
||||
const startDate = defineModel("startDate", {
|
||||
type: String,
|
||||
default: "",
|
||||
|
||||
Reference in New Issue
Block a user