|
@@ -0,0 +1,137 @@
|
|
|
+<template>
|
|
|
+ <BasicTable @register="registerTable">
|
|
|
+ <!--插槽:table标题-->
|
|
|
+ <template #tableTitle> </template>
|
|
|
+ <!--操作栏-->
|
|
|
+ <template #action="{ record }">
|
|
|
+ <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
|
|
|
+ </template>
|
|
|
+ <!--字段回显插槽-->
|
|
|
+ <template v-slot:bodyCell="{ column, record, index, text }"> </template>
|
|
|
+ <template #goods>
|
|
|
+ <div class="flex items-center h-20px">
|
|
|
+ <div>订单编号:D202503071608580001</div>
|
|
|
+ <div class="ml3">下单时间:2025-03-07 16:08:58</div>
|
|
|
+ </div>
|
|
|
+ <div class="mt3 flex items-center border-b border-solid pb-3 h-90px" v-for="item in 3">
|
|
|
+ <Image :width="80" class="rounded-16px" src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png" />
|
|
|
+ <div class="ml3">学校场地开放</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #price>
|
|
|
+ <div class="h-20px"></div>
|
|
|
+ <div class="mt3 h-90px flex flex-col justify-center border-b border-solid" v-for="item in 3">
|
|
|
+ <div class="flex items-center">
|
|
|
+ <div>¥0</div>
|
|
|
+ <div class="line-through ml-3 text-gray">¥0</div>
|
|
|
+ </div>
|
|
|
+ <div class="text-gray">x1</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #user>
|
|
|
+ <div class="h-20px"></div>
|
|
|
+ <div class="mt3 h-90px flex flex-col justify-center border-b border-solid" v-for="item in 3">
|
|
|
+ <div>杨金鑫</div>
|
|
|
+ <div class="text-gray">18984144104</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #status>
|
|
|
+ <div class="h-20px"></div>
|
|
|
+ <div class="mt3 h-90px flex flex-col justify-center border-b border-solid" v-for="item in 3">
|
|
|
+ <div>待使用</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #After>
|
|
|
+ <div class="h-20px"></div>
|
|
|
+ <div class="mt3 h-90px flex flex-col justify-center border-b border-solid" v-for="item in 3">
|
|
|
+ <div>暂无售后</div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </BasicTable>
|
|
|
+ <orderModelView @register="registerModal"></orderModelView>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+ import orderModelView from './components/orderModelView.vue';
|
|
|
+ import { Image } from 'ant-design-vue';
|
|
|
+ import { ref, reactive, computed, unref } from 'vue';
|
|
|
+ import { BasicTable, useTable, TableAction, TableImg } from '/@/components/Table';
|
|
|
+ import { useModal } from '/@/components/Modal';
|
|
|
+ import { useListPage } from '/@/hooks/system/useListPage';
|
|
|
+ import { columns, searchFormSchema } from './order.data';
|
|
|
+ import { list } from './order.api';
|
|
|
+ import { useUserStore } from '/@/store/modules/user';
|
|
|
+ import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
+ const queryParam = reactive<any>({});
|
|
|
+ const checkedKeys = ref<Array<string | number>>([]);
|
|
|
+ const userStore = useUserStore();
|
|
|
+ const { createMessage } = useMessage();
|
|
|
+ //注册model
|
|
|
+ const [registerModal, { openModal }] = useModal();
|
|
|
+ //注册table数据
|
|
|
+ const { prefixCls, tableContext } = useListPage({
|
|
|
+ tableProps: {
|
|
|
+ api: list,
|
|
|
+ columns,
|
|
|
+ canResize: false,
|
|
|
+ formConfig: {
|
|
|
+ //labelWidth: 120,
|
|
|
+ schemas: searchFormSchema,
|
|
|
+ autoSubmitOnEnter: true,
|
|
|
+ showAdvancedButton: true,
|
|
|
+ fieldMapToNumber: [],
|
|
|
+ fieldMapToTime: [['time', ['startTime', 'endTime'], 'YYYY-MM-DD HH:mm:ss']],
|
|
|
+ },
|
|
|
+ inset: true,
|
|
|
+ actionColumn: {
|
|
|
+ width: 120,
|
|
|
+ fixed: 'right',
|
|
|
+ },
|
|
|
+ beforeFetch: (params) => {
|
|
|
+ return Object.assign(params, queryParam);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
+ const [registerTable, { reload }, { selectedRowKeys }] = tableContext;
|
|
|
+ /**
|
|
|
+ * 编辑事件
|
|
|
+ */
|
|
|
+ function handleEdit(record: Recordable) {
|
|
|
+ openModal(true, {
|
|
|
+ record,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ // /**
|
|
|
+ // * 删除事件
|
|
|
+ // */
|
|
|
+ // async function handleDelete(record) {
|
|
|
+ // await deleteOne({ id: record.id }, handleSuccess);
|
|
|
+ // }
|
|
|
+ /**
|
|
|
+ * 成功回调
|
|
|
+ */
|
|
|
+ function handleSuccess() {
|
|
|
+ (selectedRowKeys.value = []) && reload();
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 操作栏
|
|
|
+ */
|
|
|
+ function getTableAction(record) {
|
|
|
+ return [
|
|
|
+ {
|
|
|
+ label: '查看',
|
|
|
+ onClick: handleEdit.bind(null, record),
|
|
|
+ // auth: 'feedback:nm_feedback:edit',
|
|
|
+ },
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ * 下拉操作栏
|
|
|
+ */
|
|
|
+ function getDropDownAction(record) {
|
|
|
+ return [];
|
|
|
+ }
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped></style>
|