1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- <script setup lang="ts">
- import { ref } from "vue";
- import searchConfig from "./config/search.config";
- import contentConfig from "./config/content.config";
- import PageAuth from "/@/components/PageAuth";
- import { PageModal, usePageModal } from "/@/components/PageModal";
- import modalConfig from "./config/modal.config";
- import { PageContent } from "/@/components/PageContent";
- import { PageSearch, usePageSearch } from "/@/components/PageSearch";
- import { exportPageContent } from "/@/utils/export";
- import ExeclUpload from "./cpns/execl-files-upload/index.vue";
- import { httpDetail } from "/@/api/mobile/exchangeOrder";
- import { useResponseHandle } from "/@/hooks/useAsync";
- const pageName = "order";
- const responseHandle = useResponseHandle();
- const { pageContentRef, handleResetClick, handleSearchClick, getMergeParams } =
- usePageSearch(undefined, undefined, searchConfig);
- const { pageModalRef, handlePreviewData, handleConfrim, defaultInfo } =
- usePageModal({
- pageContentRef
- });
- const execlUploadRef = ref<InstanceType<typeof ExeclUpload>>(null);
- async function handleDetailData(id) {
- const { code, data, message } = await httpDetail({ id: id });
- responseHandle({
- code,
- message,
- handler: () => {
- handlePreviewData(data);
- }
- });
- // actionModalRef.value.onShow("兑换商品库存", type, id);
- }
- function getParams() {
- exportPageContent({
- type: "http",
- url: "orderExport",
- params: getMergeParams(),
- name: "订单导出"
- });
- console.log(pageContentRef);
- }
- </script>
- <template>
- <!-- <PageAuth :pageName="pageName"> -->
- <PageSearch
- :form-config="searchConfig"
- @search-btn-click="handleSearchClick"
- @reset-btn-click="handleResetClick"
- >
- <template #action>
- <!-- v-if="!isSuperUser" @click="onDownloadTemplate" -->
- <el-button @click="getParams">导出订单</el-button>
- <!-- v-if="!isSuperUser" -->
- <el-button type="primary" @click="() => execlUploadRef.onDisplay()"
- >批量发货
- </el-button>
- </template>
- </PageSearch>
- <PageContent
- ref="pageContentRef"
- :content-config="contentConfig"
- @preview-btn-click="({ id }) => handleDetailData(id)"
- />
- <ExeclUpload ref="execlUploadRef" @onSuccess="handleResetClick" />
- <PageModal
- ref="pageModalRef"
- :modal-config="modalConfig"
- :default-info="defaultInfo"
- @confirm-btn-click="handleConfrim"
- />
- <!-- </PageAuth> -->
- </template>
|