Initial commit

This commit is contained in:
南宁网宿科技
2023-06-03 23:57:39 +08:00
commit 13bed2bafb
1017 changed files with 175796 additions and 0 deletions
+118
View File
@@ -0,0 +1,118 @@
<!-- 用户编辑弹窗 -->
<template>
<ele-modal
width="500px"
:visible="visible"
:confirm-loading="loading"
:title="`修改价格`"
:body-style="{ paddingBottom: '8px' }"
@update:visible="updateVisible"
@ok="save"
>
<a-form layout="horizontal">
<a-form-item>
<a-input-number :min="0" style="width: 200px" v-model:value="content" />
</a-form-item>
</a-form>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject } from 'ele-admin-pro';
import { updateOrder } from '@/api/order';
import { Order } from '@/api/order/model';
import { createOrderNo } from "@/utils/common";
// import { reloadPageTab } from '@/utils/page-tab-util';
const useForm = Form.useForm;
// 是否是修改
const isUpdate = ref(false);
const props = defineProps<{
// 弹窗是否打开
visible: boolean;
data?: Order | null;
// 修改回显的数据
field?: string | null;
orderId?: number | 0;
content?: number | 0;
}>();
const emit = defineEmits<{
(e: 'done'): void;
(e: 'update:visible', visible: boolean): void;
}>();
// 提交状态
const loading = ref(false);
const content = ref<number>(0);
const placeholder = ref('请输入订单金额');
// 用户信息
const form = reactive<Order>({
orderId: 0,
comments: '',
payPrice: undefined
});
/* 更新visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
const { resetFields, validate } = useForm(form);
/* 保存编辑 */
const save = () => {
validate()
.then(() => {
loading.value = true;
// 判断更新字段
form.orderId = props.orderId;
if (props.field === 'payPrice') {
form.payPrice = Number(content.value);
form.totalPrice = Number(content.value);
form.orderNo = createOrderNo();
}
updateOrder(form)
.then((msg) => {
loading.value = false;
message.success(msg);
updateVisible(false);
emit('done');
})
.catch((e) => {
loading.value = false;
message.error(e.message);
});
})
.catch(() => {});
};
watch(
() => props.visible,
(visible) => {
if (visible) {
if (props.orderId) {
loading.value = false;
content.value = props.content;
isUpdate.value = true;
} else {
isUpdate.value = false;
}
} else {
resetFields();
}
if (props.field == 'tenantCode') {
placeholder.value = '请输入要绑定的主体编号';
content.value = undefined;
}
}
);
</script>
<style lang="less">
.tab-pane {
min-height: 300px;
}
</style>
@@ -0,0 +1,139 @@
<!-- 用户编辑弹窗 -->
<template>
<ele-modal
width="600px"
:visible="visible"
:confirm-loading="loading"
:title="`修改内容`"
:body-style="{ paddingBottom: '8px' }"
@update:visible="updateVisible"
@ok="save"
>
<!-- 编辑器 -->
<byte-md-editor
v-model:value="content"
:locale="zh_Hans"
:plugins="plugins"
uploadImages
height="300px"
:editorConfig="{ lineNumbers: true }"
/>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref, reactive, watch } from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject } from 'ele-admin-pro';
import { updateOrder } from '@/api/order';
import { Order } from '@/api/order/model';
// import { reloadPageTab } from '@/utils/page-tab-util';
import 'bytemd/dist/index.min.css';
import 'github-markdown-css/github-markdown-light.css';
// import TinymceEditor from '@/components/TinymceEditor/index.vue';
import ByteMdEditor from '@/components/ByteMdEditor/index.vue';
import highlight from '@bytemd/plugin-highlight';
// 中文语言文件
import zh_Hans from 'bytemd/locales/zh_Hans.json';
// // 链接、删除线、复选框、表格等的插件
import gfm from '@bytemd/plugin-gfm';
// // 插件的中文语言文件
import zh_HansGfm from '@bytemd/plugin-gfm/locales/zh_Hans.json';
// // 预览界面的样式,这里用的 github 的 markdown 主题
import 'github-markdown-css/github-markdown-light.css';
const useForm = Form.useForm;
// 是否是修改
const isUpdate = ref(false);
const props = defineProps<{
// 弹窗是否打开
visible: boolean;
data?: Order | null;
// 修改回显的数据
field?: string | null;
content?: string;
orderId?: number;
}>();
const emit = defineEmits<{
(e: 'done'): void;
(e: 'update:visible', visible: boolean): void;
}>();
// 插件
const plugins = ref([
gfm({
locale: zh_HansGfm
}),
highlight()
]);
// 提交状态
const loading = ref(false);
const content = ref('');
// 用户信息
const form = reactive<Order>({
orderId: 0,
comments: ''
});
/* 更新visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
const { resetFields, validate } = useForm(form);
/* 保存编辑 */
const save = () => {
validate()
.then(() => {
loading.value = true;
// 判断更新字段
form.orderId = props.orderId;
if (props.field === 'content') {
form.comments = content.value;
}
if (props.field === 'comments') {
form.comments = content.value;
}
updateOrder(form)
.then((msg) => {
loading.value = false;
message.success(msg);
updateVisible(false);
emit('done');
})
.catch((e) => {
loading.value = false;
message.error(e.message);
});
})
.catch(() => {});
};
watch(
() => props.visible,
(visible) => {
content.value = String(props.content);
console.log(visible);
if (visible) {
if (props.data) {
loading.value = false;
content.value = String(props.content);
assignObject(form, props.data);
isUpdate.value = true;
} else {
isUpdate.value = false;
}
} else {
resetFields();
}
}
);
</script>
<style lang="less">
.tab-pane {
min-height: 300px;
}
</style>
@@ -0,0 +1,289 @@
<!-- 用户编辑弹窗 -->
<template>
<ele-modal
:width="680"
:visible="visible"
:confirm-loading="loading"
:maskClosable="false"
:maxable="maxable"
:title="isUpdate ? '编辑订单' : '添加订单'"
:body-style="{ paddingBottom: '8px' }"
@update:visible="updateVisible"
@ok="save"
>
<a-space>
<a-form
:label-col="{ md: { span: 7 }, sm: { span: 4 }, xs: { span: 24 } }"
:wrapper-col="{ md: { span: 17 }, sm: { span: 20 }, xs: { span: 24 } }"
>
<a-row :gutter="16">
<a-col :md="12" :sm="24" :xs="24">
<a-form-item label="订单名称" v-bind="validateInfos.customerName">
<a-input
allow-clear
:maxlength="30"
placeholder="请输入订单名称"
v-model:value="form.customerName"
@blur="
validate('customerName', { trigger: 'blur' }).catch(() => {})
"
/>
</a-form-item>
<a-form-item label="订单标识" v-bind="validateInfos.customerCode">
<a-input
allow-clear
:maxlength="20"
placeholder="请输入用户账号"
v-model:value="form.customerCode"
/>
</a-form-item>
<a-form-item label="跟进状态" v-bind="validateInfos.progress">
<progress-select
v-model:value="form.progress"
@blur="
validate('progress', { trigger: 'blur' }).catch(() => {})
"
/>
</a-form-item>
<a-form-item label="订单类型" v-bind="validateInfos.customerType">
<type-select
v-model:value="form.customerType"
@blur="
validate('customerType', { trigger: 'blur' }).catch(() => {})
"
/>
</a-form-item>
<a-form-item label="订单来源" v-bind="validateInfos.customerSource">
<source-select
v-model:value="form.customerSource"
@blur="
validate('customerSource', { trigger: 'blur' }).catch(() => {})
"
/>
</a-form-item>
<a-form-item label="头像" v-bind="validateInfos.customerAvatar">
<ele-image-upload
v-model:value="images"
:item-style="{ width: '90px', height: '90px' }"
:limit="1"
@upload="onUpload"
/>
</a-form-item>
</a-col>
<a-col :md="12" :sm="24" :xs="24">
<a-form-item label="联系人" v-bind="validateInfos.customerContacts">
<a-input
allow-clear
:maxlength="20"
placeholder="请填写联系人"
v-model:value="form.customerContacts"
/>
</a-form-item>
<a-form-item label="手机号码" v-bind="validateInfos.customerMobile">
<a-input
allow-clear
:maxlength="20"
placeholder="请填写联系人手机号码"
v-model:value="form.customerMobile"
/>
</a-form-item>
<a-form-item
label="联系地址"
v-bind="validateInfos.customerAddress"
>
<a-input
allow-clear
placeholder="请填写联系地址"
v-model:value="form.customerAddress"
/>
</a-form-item>
<a-form-item label="公司座机" v-bind="validateInfos.customerPhone">
<a-input
allow-clear
:maxlength="20"
placeholder="请填写公司座机电话"
v-model:value="form.customerPhone"
/>
</a-form-item>
<a-form-item label="排序" v-bind="validateInfos.sortNumber">
<a-input
allow-clear
:maxlength="20"
placeholder="排序"
v-model:value="form.sortNumber"
/>
</a-form-item>
<a-form-item label="备注" v-bind="validateInfos.comments">
<a-textarea
:rows="4"
:maxlength="200"
placeholder="请输入备注"
v-model:value="form.comments"
/>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-space>
</ele-modal>
</template>
<script lang="ts" setup>
import {ref, reactive, watch, computed} from 'vue';
import { Form, message } from 'ant-design-vue';
import { assignObject } from 'ele-admin-pro';
import TypeSelect from './customer-edit/type-select.vue';
import ProgressSelect from './customer-edit/progress-select.vue';
import SourceSelect from './customer-edit/source-select.vue';
import { addCustomer, updateCustomer } from '@/api/oa/customer';
import type { Customer } from '@/api/oa/customer/model';
import { createCode } from '@/utils/common';
import { uploadFile } from '@/api/system/file';
import type { ItemType } from 'ele-admin-pro/es/ele-image-upload/types';
import { FILE_SERVER } from '@/config/setting';
import { useUserStore } from '@/store/modules/user';
const userStore = useUserStore();
// 当前用户信息
const loginUser = computed(() => userStore.info ?? {});
// 是否是修改
const isUpdate = ref(false);
const useForm = Form.useForm;
const props = defineProps<{
// 弹窗是否打开
visible: boolean;
// 修改回显的数据
data?: Customer | null;
}>();
const emit = defineEmits<{
(e: 'done'): void;
(e: 'update:visible', visible: boolean): void;
}>();
// 提交状态
const loading = ref(false);
// 是否显示最大化切换按钮
const maxable = ref(true);
// 用户信息
const form = reactive<Customer>({
customerCode: '',
customerName: '',
customerType: undefined,
progress: undefined,
customerMobile: '',
customerAvatar: '',
customerPhone: '',
customerContacts: '',
customerAddress: '',
comments: '',
status: '0',
sortNumber: 100,
customerId: 0,
userId: '',
});
// 已上传数据, 可赋初始值用于回显
const images = ref(<any>[]);
/* 更新visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
// 表单验证规则
const rules = reactive({
customerName: [
{
required: true,
type: 'string',
message: '请输入订单名称',
trigger: 'blur'
}
],
customerCode: [
{
required: true,
type: 'string',
message: '请输入合法的IP地址',
trigger: 'blur'
}
],
progress: [
{
required: true,
type: 'string',
message: '请选择跟进状态',
trigger: 'blur'
}
]
});
const { resetFields, validate, validateInfos } = useForm(form, rules);
/* 保存编辑 */
const save = () => {
validate()
.then(() => {
loading.value = true;
// 去除空格
form.customerName = form.customerName?.replace(/\s*/g, '');
if(isUpdate.value == false) {
form.userId = loginUser.value.userId;
}
const data = {
...form
};
// 转字符串
const saveOrUpdate = isUpdate.value ? updateCustomer : addCustomer;
saveOrUpdate(data)
.then((msg) => {
loading.value = false;
message.success(msg);
updateVisible(false);
emit('done');
})
.catch((e) => {
loading.value = false;
message.error(e.message);
});
})
.catch(() => {});
};
const onUpload = (d: ItemType) => {
uploadFile(<File>d.file)
.then((result) => {
form.customerAvatar = result.path;
message.success('上传成功');
})
.catch((e) => {
message.error(e.message);
});
};
watch(
() => props.visible,
(visible) => {
if (visible) {
if (props.data) {
loading.value = false;
// 头像赋值
images.value = [];
if(props.data.customerAvatar){
images.value.push({ uid:1, url: FILE_SERVER + props.data.customerAvatar, status: '' });
}
assignObject(form, props.data);
isUpdate.value = true;
} else {
form.customerCode = createCode();
isUpdate.value = false;
}
} else {
resetFields();
}
}
);
</script>
<style lang="less"></style>
@@ -0,0 +1,379 @@
<!-- 用户编辑弹窗 -->
<template>
<ele-modal
:width="`80%`"
:visible="visible"
:confirm-loading="loading"
:maxable="maxAble"
:title="isUpdate ? '编辑订单' : '订单详情'"
:body-style="{ paddingBottom: '8px', background: '#f3f3f3' }"
@update:visible="updateVisible"
:maskClosable="false"
:footer="null"
@ok="save"
>
<a-card title="订单详情" class="order-card">
<!-- <a-space>-->
<!-- <a-button>发货</a-button>-->
<!-- <a-button>商家备注</a-button>-->
<!-- <a-button>打印小票</a-button>-->
<!-- </a-space>-->
<a-row :gutter="16">
<a-col
v-bind="
styleResponsive
? { xl: 8, lg: 12, md: 12, sm: 24, xs: 24 }
: { span: 8 }
"
>
<a-form-item label="订单号" name="orderId">
<span>{{ data.orderId }}</span>
</a-form-item>
</a-col>
<a-col
v-bind="
styleResponsive
? { xl: 8, lg: 12, md: 12, sm: 24, xs: 24 }
: { span: 8 }
"
>
<a-form-item label="实付款金额" name="payPrice">
<span class="ele-text-warning"
>¥{{ formatNumber(data.payPrice) }}</span
>
</a-form-item>
</a-col>
<a-col
v-bind="
styleResponsive
? { xl: 8, lg: 12, md: 12, sm: 24, xs: 24 }
: { span: 8 }
"
>
<a-form-item label="订单状态" name="orderStatus">
<a-tag>{{ data.payStatus === 20 ? '已下单' : '' }}</a-tag>
</a-form-item>
</a-col>
<a-col
v-bind="
styleResponsive
? { xl: 8, lg: 12, md: 12, sm: 24, xs: 24 }
: { span: 8 }
"
>
<a-form-item label="买家信息" name="deliveryType">
<router-link :to="'/system/user/details?id=' + data.userId">
<span class="ele-text-primary">{{ data.nickname }}</span>
</router-link>
</a-form-item>
</a-col>
<a-col
v-bind="
styleResponsive
? { xl: 8, lg: 12, md: 12, sm: 24, xs: 24 }
: { span: 8 }
"
>
<a-form-item label="预定日期" name="deliveryTime">
{{ toDateString(data.deliveryTime, 'yyyy-MM-dd') }}
</a-form-item>
</a-col>
<a-col
v-bind="
styleResponsive
? { xl: 8, lg: 12, md: 12, sm: 24, xs: 24 }
: { span: 8 }
"
>
<a-form-item label="下单时间" name="createTime">
{{ data.createTime }}
</a-form-item>
</a-col>
<a-col
v-bind="
styleResponsive
? { xl: 8, lg: 12, md: 12, sm: 24, xs: 24 }
: { span: 8 }
"
>
<a-form-item label="交易流水号" name="orderNo">
{{ data.orderNo }}
</a-form-item>
</a-col>
<a-col
v-bind="
styleResponsive
? { xl: 8, lg: 12, md: 12, sm: 24, xs: 24 }
: { span: 8 }
"
>
<a-form-item label="买家留言" name="buyerRemark">
<span>{{ data.buyerRemark }}</span>
</a-form-item>
</a-col>
<a-col
v-bind="
styleResponsive
? { xl: 8, lg: 12, md: 12, sm: 24, xs: 24 }
: { span: 8 }
"
>
<a-form-item label="订单备注" name="comments">
<span>{{ data.comments }}</span>
</a-form-item>
</a-col>
</a-row>
</a-card>
<a-card title="菜品信息" class="order-card">
<a-spin :spinning="loading">
<a-table
:data-source="orderGoodsList"
:columns="columns"
:pagination="false"
>
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'goodsName'">
<div class="goods-info">
<a-image
v-if="record.imageUrl"
:src="record.imageUrl"
:preview="false"
:width="50"
/>
<div class="info">
<div>{{ record.goodsName }}</div>
<div class="ele-text-placeholder" v-if="record.gear === 10">
食堂档口
</div>
<div class="ele-text-placeholder" v-if="record.gear === 20">
物品档口
</div>
</div>
</div>
</template>
</template>
</a-table>
</a-spin>
</a-card>
</ele-modal>
</template>
<script lang="ts" setup>
import { ref, reactive, watch } from 'vue';
import { Form } from 'ant-design-vue';
import { assignObject, toDateString } from 'ele-admin-pro';
import { useThemeStore } from '@/store/modules/theme';
import { formatNumber } from 'ele-admin-pro/es';
import { storeToRefs } from 'pinia';
import { Order } from '@/api/order/model';
import { ColumnItem } from 'ele-admin-pro/es/ele-pro-table/types';
import { OrderGoods } from '@/api/order/goods/model';
import { listOrderGoods } from '@/api/order/goods';
const useForm = Form.useForm;
// 是否开启响应式布局
const themeStore = useThemeStore();
const { styleResponsive } = storeToRefs(themeStore);
const props = defineProps<{
// 弹窗是否打开
visible: boolean;
// 修改回显的数据
data?: Order | null;
}>();
export interface step {
title?: String | undefined;
subTitle?: String | undefined;
description?: String | undefined;
}
// 是否是修改
const isUpdate = ref(false);
// 是否显示最大化切换按钮
const maxAble = ref(true);
const orderGoodsList = ref<OrderGoods[]>([]);
// 步骤条
const steps = ref<step[]>([
{
title: '报餐',
description: undefined
},
{
title: '付款',
description: undefined
},
{
title: '发餐',
description: undefined
},
{
title: '取餐',
description: undefined
},
{
title: '完成',
description: undefined
}
]);
const active = ref(2);
const emit = defineEmits<{
(e: 'done'): void;
(e: 'update:visible', visible: boolean): void;
}>();
// 订单信息
const order = reactive<Order>({
orderId: undefined,
orderNo: '',
userId: undefined,
orderSourceData: ''
});
// 请求状态
const loading = ref(true);
const { resetFields } = useForm(order);
/* 更新visible */
const updateVisible = (value: boolean) => {
emit('update:visible', value);
};
const columns = ref<ColumnItem[]>([
// {
// title: '菜品ID',
// dataIndex: 'goodsId'
// },
{
title: '菜品信息',
dataIndex: 'goodsName',
key: 'goodsName'
},
{
title: '菜品价格',
dataIndex: 'goodsPrice',
customRender: ({ text }) => '¥' + text
},
{
title: '购买数量',
dataIndex: 'totalNum',
key: 'totalNum'
},
{
title: '预定日期',
dataIndex: 'deliveryTime',
key: 'deliveryTime',
customRender: () => toDateString(props.data?.deliveryTime, 'yyyy-MM-dd')
},
{
title: '状态',
dataIndex: 'deliveryStatus',
key: 'deliveryStatus',
customRender: ({ text }) => (text == 10 ? '未签到' : '已签到')
}
]);
/* 制作步骤条 */
const loadSteps = (order) => {
steps.value = [];
steps.value.push({
title: '下单'
});
steps.value.push({
title: '付款'
});
steps.value.push({
title: '发货'
});
steps.value.push({
title: '收货'
});
steps.value.push({
title: '完成'
});
// 下单
if (order.payStatus == 10) {
active.value = 0;
steps.value[0].description = order.createTime;
}
// 付款
if (order.payStatus == 20) {
active.value = 1;
steps.value[0].description = order.createTime;
steps.value[1].description = order.payTime;
}
// 发货
if (order.payStatus == 20 && order.deliveryStatus == 20) {
active.value = 2;
steps.value[0].description = order.createTime;
steps.value[1].description = order.payTime;
steps.value[2].description = order.deliveryTime;
}
// 收货
if (order.payStatus == 20 && order.receiptStatus == 20) {
active.value = 3;
steps.value[0].description = order.createTime;
steps.value[1].description = order.payTime;
steps.value[2].description = order.deliveryTime;
steps.value[3].description = order.receiptTime;
}
// 完成
if (order.payStatus == 20 && order.orderStatus == 30) {
active.value = 4;
steps.value[0].description = order.createTime;
steps.value[1].description = order.payTime;
steps.value[2].description = order.deliveryTime;
steps.value[3].description = order.receiptTime;
}
// 已取消
if (order.orderStatus == 20) {
active.value = 4;
}
};
const getOrderGoods = () => {
const orderId = props.data?.orderId;
listOrderGoods({ orderId }).then((data) => {
orderGoodsList.value = data.filter((d) => d.totalNum > 0);
});
};
/* 保存编辑 */
const save = () => {};
watch(
() => props.visible,
(visible) => {
if (visible) {
if (props.data) {
loading.value = false;
assignObject(order, props.data);
loadSteps(props.data);
getOrderGoods();
}
} else {
resetFields();
}
}
);
</script>
<style lang="less" scoped>
.order-card {
margin-bottom: 20px;
}
.ant-form-item {
margin-bottom: 5px;
}
.goods-info {
display: flex;
.info {
padding-left: 5px;
display: flex;
flex-direction: column;
}
}
</style>
@@ -0,0 +1,161 @@
<!-- 搜索表单 -->
<template>
<a-space :size="10" style="flex-wrap: wrap">
<a-button
danger
type="primary"
class="ele-btn-icon"
:disabled="selection.length === 0"
@click="removeBatch"
>
<template #icon>
<delete-outlined />
</template>
<span>批量删除</span>
</a-button>
<a-radio-group v-model:value="listType" @change="handleTabs">
<a-radio-button :value="0">全部</a-radio-button>
<a-radio-button :value="1">已下单</a-radio-button>
<a-radio-button :value="4">已完成</a-radio-button>
<a-radio-button :value="5">待付款</a-radio-button>
<a-radio-button :value="6">临时报餐</a-radio-button>
</a-radio-group>
<a-date-picker
placeholder="预定日期"
value-format="YYYY-MM-DD"
v-model:value="where.deliveryTime"
@change="search"
/>
<a-select
v-model:value="where.week"
style="width: 120px"
placeholder="请选择星期"
allow-clear
@change="handleWeek"
>
<a-select-option :value="1">星期一</a-select-option>
<a-select-option :value="2">星期二</a-select-option>
<a-select-option :value="3">星期三</a-select-option>
<a-select-option :value="4">星期四</a-select-option>
<a-select-option :value="5">星期五</a-select-option>
<a-select-option :value="6">星期六</a-select-option>
<a-select-option :value="0">星期日</a-select-option>
</a-select>
<a-input-search
allow-clear
placeholder="请输入关键词"
v-model:value="where.keywords"
@pressEnter="search"
@search="search"
/>
</a-space>
</template>
<script lang="ts" setup>
import useSearch from '@/utils/use-search';
import { ref, watch } from 'vue';
import { OrderParam } from '@/api/order/model';
import { assignObject } from 'ele-admin-pro';
const props = withDefaults(
defineProps<{
// 选中的角色
selection?: [];
}>(),
{}
);
const emit = defineEmits<{
(e: 'search', where?: OrderParam): void;
(e: 'add'): void;
(e: 'remove'): void;
(e: 'advanced'): void;
}>();
// 表单数据
const { where, resetFields } = useSearch<OrderParam>({
orderNo: undefined,
userId: undefined,
payStatus: undefined,
week: undefined,
deliveryStatus: undefined,
orderStatus: undefined
});
// 日期范围选择
const dateRange = ref<[string, string]>(['', '']);
const listType = ref<number>(0);
/* 搜索 */
const search = () => {
const [d1, d2] = dateRange.value ?? [];
emit('search', {
...where,
createTimeStart: d1 ? d1 + ' 00:00:00' : '',
createTimeEnd: d2 ? d2 + ' 23:59:59' : '',
deliveryTime: where.deliveryTime ? where.deliveryTime + ' 00:00:00' : ''
});
};
// 批量删除
const removeBatch = () => {
emit('remove');
};
const handleTabs = (e) => {
resetFields();
const listType = Number(e.target.value);
// 全部订单
if (listType == 0) {
assignObject(where, {});
console.log('全部');
}
// 待发货
if (listType == 1) {
console.log('已下单');
where.payStatus = 20;
where.orderStatus = 10;
}
// 待收货
// if (listType == 2) {
// console.log('待发货');
// where.payStatus = 20;
// where.deliveryStatus = 20;
// where.receiptStatus = 10;
// }
// 待付款
// if (listType == 3) {
// console.log('待付款');
// where.orderStatus = 20;
// }
// 已完成
if (listType == 4) {
console.log('已完成');
where.payStatus = 20;
where.deliveryStatus = 30;
}
// 已取消
if (listType == 5) {
where.payStatus = 10;
}
// 已取消
if (listType == 6) {
console.log('临时报餐');
where.isTemporary = 1;
}
console.log(where);
emit('search', {
...where
});
};
const handleWeek = (index) => {
where.week = index;
search();
};
watch(
() => props.selection,
() => {}
);
</script>