From c8ebd5ef00787718d27e9691a7e36c2e22180094 Mon Sep 17 00:00:00 2001 From: lzq <2495532633@qq.com> Date: Sun, 25 Jan 2026 21:50:22 +0800 Subject: [PATCH] 1 --- src/components/page/FormPage.vue | 8 +- src/dts/components.d.ts | 3 +- src/pages/order/book-order/constants.ts | 113 ++++++++++++++++++++++++ src/pages/order/book-order/order.d.ts | 2 +- 4 files changed, 116 insertions(+), 10 deletions(-) create mode 100644 src/pages/order/book-order/constants.ts diff --git a/src/components/page/FormPage.vue b/src/components/page/FormPage.vue index 5ad3b0e..cbffe75 100644 --- a/src/components/page/FormPage.vue +++ b/src/components/page/FormPage.vue @@ -114,13 +114,7 @@ function doExport() { return } loading.value = true - props.exportHandler(searchForm.$clone() as F) - .then((res) => { - const {content, filename} = res.data ?? {} - if (content != null && filename != null) { - saveFile(content, filename) - } - }) + saveFile(props.exportHandler(searchForm.$clone() as F)) .finally(() => { loading.value = false }) diff --git a/src/dts/components.d.ts b/src/dts/components.d.ts index 927879e..df50bcf 100644 --- a/src/dts/components.d.ts +++ b/src/dts/components.d.ts @@ -5,7 +5,6 @@ // ------ // Generated by unplugin-vue-components // Read more: https://github.com/vuejs/core/pull/3399 -import { GlobalComponents } from 'vue' export {} @@ -122,4 +121,4 @@ declare global { const ElUpload: typeof import('element-plus/es')['ElUpload'] const RouterLink: typeof import('vue-router')['RouterLink'] const RouterView: typeof import('vue-router')['RouterView'] -} \ No newline at end of file +} diff --git a/src/pages/order/book-order/constants.ts b/src/pages/order/book-order/constants.ts new file mode 100644 index 0000000..9ce89c8 --- /dev/null +++ b/src/pages/order/book-order/constants.ts @@ -0,0 +1,113 @@ +import { createEnum } from '@/common/utils/enums.ts' + +const orderCategoryList = [ + { + val: 'HuiShouYuYue', + txt: '回收预约单', + }, + { + val: 'XiaoShouYuYue', + txt: '销售预约单', + }, + { + val: 'DuanBoRu', + txt: '短驳入', + }, + { + val: 'DuanBoChu', + txt: '短驳出', + }, +] as const +export const orderCategory = createEnum(orderCategoryList) + +const orderStatusList = [ + { + val: 'YiYuYue', + txt: '已预约', + }, + { + val: 'JinXingZhong', + txt: '进行中', + }, + { + val: 'YiWanCheng', + txt: '已完成', + }, + { + val: 'YiQuXiao', + txt: '已取消', + }, +] as const +export const orderStatus = createEnum(orderStatusList) + +const transStatusList = [ + { + val: 'DaiPaiDan', + txt: '待派单', + }, + { + val: 'DaiJieDan', + txt: '待接单', + }, + { + val: 'YiJieDan', + txt: '已接单', + }, + { + val: 'YunShuZhong', + txt: '运输中', + }, + { + val: 'YiJinChang', + txt: '已进场', + }, + { + val: 'YiChuChang', + txt: '已出场', + }, + { + val: 'YiWanCheng', + txt: '已完成', + }, + { + val: 'YiQuXiao', + txt: '已取消', + }, +] as const +export const transStatus = createEnum(transStatusList) + +const checkStatusList = [ + { + val: 'Wu', + txt: '无需勘料', + }, + { + val: 'YiKanLiao', + txt: '已勘料', + }, + { + val: 'WeiKanLiao', + txt: '未勘料', + }, +] as const +export const checkStatus = createEnum(checkStatusList) + +const paymentStatusList = [ + { + val: 'MianFei', + txt: '免费', + }, + { + val: 'WeiZhiFu', + txt: '未支付', + }, + { + val: 'YiZhiFu', + txt: '已支付', + }, + { + val: 'YiTuiKuan', + txt: '已退款', + }, +] as const +export const paymentStatus = createEnum(paymentStatusList) diff --git a/src/pages/order/book-order/order.d.ts b/src/pages/order/book-order/order.d.ts index 2fb9af6..bf21444 100644 --- a/src/pages/order/book-order/order.d.ts +++ b/src/pages/order/book-order/order.d.ts @@ -59,7 +59,7 @@ declare global { interface PaymentRecord { // Id id?: string - // 订单收费项 Id,QiTa-->其他、ChanPin-->产品、YunFei-->运费 + // 订单收费项 Id expenseItemId?: string // 付费方;字典代码:payer,PingTai-->平台、ChanFei-->产废方、YunShu-->运输方、XiaoNa-->消纳方、CaiGou-->采购方 payer?: string