From 581b8533f44d52a17fff310ef5c1ee9d093462c2 Mon Sep 17 00:00:00 2001
From: lonewolfyx <877085893@qq.com>
Date: Thu, 5 Mar 2026 16:21:47 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=95=86=E5=8A=A1?=
=?UTF-8?q?=E5=AE=A1=E6=89=B9=E9=A6=96=E9=A1=B5=E5=A4=9A=E9=80=89=E4=BB=A5?=
=?UTF-8?q?=E5=8F=8A=E9=AB=98=E5=BA=A6=E4=B8=8B=E6=BB=91=E5=9B=BA=E5=AE=9A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/work/BusinessApproval/ListItem.vue | 37 +++++++++--
pages/work/BusinessApproval/index.vue | 78 +++++++++++++++++++++++-
2 files changed, 107 insertions(+), 8 deletions(-)
diff --git a/pages/work/BusinessApproval/ListItem.vue b/pages/work/BusinessApproval/ListItem.vue
index 5c38220..89e7c75 100644
--- a/pages/work/BusinessApproval/ListItem.vue
+++ b/pages/work/BusinessApproval/ListItem.vue
@@ -8,6 +8,20 @@
style="margin: 0;margin-bottom: 20px"
@click="handleDetail(item)"
>
+
+
+
+
+ {{ index + 1 }}
+ {{ item.usernames }}
+
+
+ {{ item.contractcode }}
+
+
+
+
货主:
@@ -25,24 +39,27 @@
订单金额:
{{ item.contractmoney.toFixed(2) }}
-
- 区域:
- {{ item.areaName }}
-
+
+
+
+
\ No newline at end of file
diff --git a/pages/work/BusinessApproval/index.vue b/pages/work/BusinessApproval/index.vue
index 246bf01..fc0ac66 100644
--- a/pages/work/BusinessApproval/index.vue
+++ b/pages/work/BusinessApproval/index.vue
@@ -1,5 +1,5 @@
-
+
@@ -13,7 +13,37 @@
-
+
+
+
+ 已选订单数量:
+ {{ selected.length }}
+
+
+ 已选订单总金额:
+ {{ totalMoney.toFixed(2) }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{
loading.value = false
}
+const selected = ref([])
+const totalMoney = ref(0)
+const handleSelect = (payload) => {
+ const {checked, data} = payload
+ const id = data.saleid
+
+ if (checked) {
+ if (!selected.value.includes(id)) {
+ selected.value.push(id)
+ }
+ } else {
+ selected.value = selected.value.filter(item => item !== id)
+ }
+
+ totalMoney.value = tableData.value.filter(item => selected.value.includes(item.saleid))
+ .map(i => i.contractmoney)
+ .reduce((a, b) => a + b, 0)
+ ?? 0
+
+}
+
+const targetRef = ref(null)
+const isFixed = ref(false)
+
+const handleScroll = () => {
+ if (!targetRef.value) return
+
+ const rect = targetRef.value.$el
+ ? targetRef.value.$el.getBoundingClientRect()
+ : targetRef.value.getBoundingClientRect()
+
+ isFixed.value = rect.top <= -140
+}
+
onMounted(async () => {
await handleQuery()
})
+watch(targetRef, (el) => {
+ if (!el) return
+ window.addEventListener('scroll', handleScroll)
+})
+
+onUnmounted(() => {
+ window.removeEventListener('scroll', handleScroll)
+})