From 304d944699e1f3af1acb69b5bb9718d9c74f22ed Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Fri, 10 Jan 2025 11:39:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(order):=20=E9=A2=84=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=A2=9E=E5=8A=A0=E8=AE=A2=E5=8D=95=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=92=8C=E5=87=BA=E5=85=A5=E5=BA=93=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E7=AD=9B=E9=80=89=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增订单类型和出入库状态的筛选选项 - 添加相应的 API 接口获取统计数据 - 实现筛选条件变化时重新获取列表数据 - 优化页面布局,增加统计信息显示 --- src/api/beforehand_order.ts | 6 +- src/views/order/beforehand_order/index.vue | 164 +++++++++++++++------ 2 files changed, 124 insertions(+), 46 deletions(-) diff --git a/src/api/beforehand_order.ts b/src/api/beforehand_order.ts index a3bc133a6..0ecbc5445 100644 --- a/src/api/beforehand_order.ts +++ b/src/api/beforehand_order.ts @@ -4,6 +4,9 @@ import request from '@/utils/request' export function apiBeforehandOrderLists(params: any) { return request.get({ url: '/beforehand_order/beforehandorder/lists', params }) } +export function apiBeforehandOrderStatisticsCount(params: any) { + return request.get({ url: '/beforehand_order/beforehandorder/statistics_count', params }) +} // 添加预订单表 export function apiBeforehandOrderAdd(params: any) { @@ -95,7 +98,6 @@ export function apiPurchaseOrderReturnSupplier(params: any) { return request.post({ url: '/beforehand_order/beforehandorder/return_supplier', params }) } - // 预订单日志列表 export function apiBeforehandOrderLogLists(params: any) { return request.get({ url: '/beforehand_order/beforehandorder/logList', params }) @@ -109,4 +111,4 @@ export function apiBeforehandOrderLogSave(params: any) { //确认预订单日志 export function apiBeforehandOrderLogConfirm(params: any) { return request.post({ url: '/beforehand_order/beforehandorder/confirmLog', params }) -} \ No newline at end of file +} diff --git a/src/views/order/beforehand_order/index.vue b/src/views/order/beforehand_order/index.vue index 6b0ec5d22..36a9a10f0 100644 --- a/src/views/order/beforehand_order/index.vue +++ b/src/views/order/beforehand_order/index.vue @@ -21,21 +21,6 @@ @change="changeStartEndTime" /> - - - - - - - - - - -
- - - - - - - - - 查询 - 重置 + 查询 + 重置 商品列表 + + + + + + + + + + + + + + + + +
@@ -164,9 +187,13 @@ - + - + @@ -260,9 +291,10 @@ import moment from 'moment' import { apiBeforehandOrderLists, apiBeforehandOrderDelete, - apiBeforehandOrderSettle, + apiBeforehandOrderSettle, apiPurchaseOrderOrderOutbound, - apiPurchaseOrderOrderOutbound3 + apiPurchaseOrderOrderOutbound3, + apiBeforehandOrderStatisticsCount } from '@/api/beforehand_order' import { apiSystemStoreLists } from '@/api/system_store' import DrawerPop from './component/drawer.vue' @@ -273,9 +305,28 @@ const showEdit = ref(false) const editRef = shallowRef>() const showDrawer = ref(false) +const statisticsCount = ref([]) const drawerRef = ref(null) const drawerData = ref([]) +const activeName = ref('all') +const handleClick = (e) => { + if (activeName.value == 'all') { + queryParams.order_type = '' + } else { + queryParams.order_type = activeName.value + } + get_lists() +} +const activeName2 = ref('all') +const handleClick2 = (e) => { + if (activeName2.value == 'all') { + queryParams.warehouse_type = '' + } else { + queryParams.warehouse_type = activeName2.value + } + get_lists() +} const handleDrawer = (data: any) => { showDrawer.value = true drawerRef.value?.open(data.id) @@ -323,13 +374,13 @@ const { pager, getLists, resetParams, resetPage } = usePaging({ const handleDelete = async (id: number | any[]) => { await feedback.confirm('确定要删除?') await apiBeforehandOrderDelete({ id }) - getLists() + get_lists() } // 结算 const handleSettle = async (id) => { await apiBeforehandOrderSettle({ id }) - getLists() + get_lists() } const startEndTime = ref([]) @@ -342,7 +393,7 @@ const changeStartEndTime = () => { queryParams.start_time = '' queryParams.end_time = '' } - getLists() + get_lists() } const xlsx7 = (id) => { apiPurchaseOrderOrderOutbound({ @@ -381,7 +432,32 @@ const remoteMethod = (e = '') => { }, 300) }) } -onMounted(() => { +const statistics_count = () => { + apiBeforehandOrderStatisticsCount(queryParams).then((res) => { + statisticsCount.value = res + }) +} +const get_lists = () => { getLists() + statistics_count() +} +const getResetParams = () => { + queryParams.order_id = '' + queryParams.product_name = '' + queryParams.financial_pm = 1 + queryParams.store_id = '' + queryParams.start_time = '' + queryParams.end_time = '' + queryParams.supplier_id = '' + queryParams.order_sn = '' + queryParams.order_ck = '' + queryParams.order_rk = '' + queryParams.order_type = '' + queryParams.warehouse_type = '' + queryParams.mark = '' + resetParams() +} +onMounted(() => { + get_lists() })