From 6733ec26387d103af2b5161f2e11f84647ab7144 Mon Sep 17 00:00:00 2001 From: lonewolfyx <877085893@qq.com> Date: Thu, 5 Mar 2026 14:44:24 +0800 Subject: [PATCH 1/8] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E5=95=86?= =?UTF-8?q?=E5=8A=A1=E5=AE=A1=E6=A0=B8=E5=88=97=E8=A1=A8=E5=BA=8F=E5=8F=B7?= =?UTF-8?q?+=E8=B4=A7=E4=B8=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/work/BusinessApproval/ListItem.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/work/BusinessApproval/ListItem.vue b/pages/work/BusinessApproval/ListItem.vue index 2d44b30..5c38220 100644 --- a/pages/work/BusinessApproval/ListItem.vue +++ b/pages/work/BusinessApproval/ListItem.vue @@ -4,11 +4,15 @@ :key="item.saleid" :class="index % 2 === 0 ? 'card-even' : 'card-odd'" :extra="item.contractcode" - :title="item.usernames" + :title="`${index+1}、${item.usernames}`" style="margin: 0;margin-bottom: 20px" @click="handleDetail(item)" > + + 货主: + {{ item.companyName }} + 状态: {{ item.stateText }} 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 2/8] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=95=86?= =?UTF-8?q?=E5=8A=A1=E5=AE=A1=E6=89=B9=E9=A6=96=E9=A1=B5=E5=A4=9A=E9=80=89?= =?UTF-8?q?=E4=BB=A5=E5=8F=8A=E9=AB=98=E5=BA=A6=E4=B8=8B=E6=BB=91=E5=9B=BA?= =?UTF-8?q?=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)" > + + 货主: @@ -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 @@ @@ -69,13 +95,10 @@ import {getCurrentInstance, onMounted, ref} from "vue" import UniForms from "../../../uni_modules/uni-forms/components/uni-forms/uni-forms.vue"; import UniFormsItem from "../../../uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue"; -import DictSelect from "../../../components/DictSelect/DictSelect.vue"; import ProductionUnit from "../../../components/ProductionUnit/ProductionUnit.vue"; import MBCard from "../../../components/MB/MBCard.vue"; import {managerConfirm, managerRefuse, mangerList} from "../../../api/BusinessApproval"; -import MBPagination from "../../../components/MB/MBPagination.vue"; import MBLoading from "../../../components/MB/MBLoading.vue"; -import ListItem from "./ListItem.vue"; const {proxy} = getCurrentInstance() @@ -96,6 +119,8 @@ const tableData = ref([]) const submitLoading = ref(false) const handleQuery = async () => { + selected.value = [] + totalMoney.value = 0 loading.value = true const data = await mangerList(queryParams.value, paging.value) total.value = data.total @@ -105,24 +130,24 @@ const handleQuery = async () => { 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 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 +// +// } onMounted(async () => { await handleQuery() @@ -160,5 +185,13 @@ const handleSubmit = async () => { await handleQuery() submitLoading.value = false } + +const selectionChange = (payload) => { + const indexSet = new Set(payload.detail.index) + const filterData = tableData.value.filter((_, i) => indexSet.has(i)) + + selected.value = filterData.map(item => item.saleid) + totalMoney.value = filterData.map(item => item.contractmoney).reduce((a, b) => a + b, 0) ?? 0 +} From 7106c23be879dfc79b64c69a5ac6ee9f24f80562 Mon Sep 17 00:00:00 2001 From: lonewolfyx <877085893@qq.com> Date: Fri, 6 Mar 2026 15:30:41 +0800 Subject: [PATCH 8/8] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96table=E5=AE=BD?= =?UTF-8?q?=E5=BA=A6=E4=BB=A5=E5=8F=8A=E4=BA=8C=E6=AC=A1=E7=A1=AE=E8=AE=A4?= =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/work/BusinessApproval/index.vue | 108 +++++++++++++++++++------- 1 file changed, 78 insertions(+), 30 deletions(-) diff --git a/pages/work/BusinessApproval/index.vue b/pages/work/BusinessApproval/index.vue index 7bd82a9..5b965f8 100644 --- a/pages/work/BusinessApproval/index.vue +++ b/pages/work/BusinessApproval/index.vue @@ -57,10 +57,10 @@ > 序号 - 商业公司 - 货主 - 合同编号 - 订单金额 + 商业公司 + 货主 + 合同编号 + 订单金额 {{ index + 1 }} @@ -130,6 +130,7 @@ const handleQuery = async () => { const selected = ref([]) const totalMoney = ref(0) +const popup = ref() // const handleSelect = (payload) => { // const {checked, data} = payload // const id = data.saleid @@ -155,35 +156,82 @@ onMounted(async () => { const handleBack = async () => { - submitLoading.value = true - await Promise.allSettled( - selected.value.map(id => - managerRefuse({ - saleIds: id, - actionType: new Date().getDate() < 25 ? '1' : '0' - }) - ) - ) - selected.value = [] - totalMoney.value = 0 - await handleQuery() - submitLoading.value = false + uni.showModal({ + title: '提示', + content: '是否要进行回退?', + success: async function (res) { + if (res.confirm) { + uni.showLoading({ + title: '加载中' + }); + await Promise.allSettled( + selected.value.map(id => + managerRefuse({ + saleIds: id, + actionType: new Date().getDate() < 25 ? '1' : '0' + }) + ) + ) + selected.value = [] + totalMoney.value = 0 + await handleQuery() + + uni.showToast({ + title: '操作成功', + icon: 'none', + duration: 2000 + }); + uni.hideLoading() + } else if (res.cancel) { + uni.showToast({ + title: '用户取消操作', + icon: 'none', + duration: 2000 + }); + + } + } + }); } const handleSubmit = async () => { - submitLoading.value = true - await Promise.allSettled( - selected.value.map(id => - managerConfirm({ - saleIds: id, - actionType: new Date().getDate() < 25 ? '1' : '0' - }) - ) - ) - selected.value = [] - totalMoney.value = 0 - await handleQuery() - submitLoading.value = false + uni.showModal({ + title: '提示', + content: '是否要进行审核?', + success: async function (res) { + if (res.confirm) { + uni.showLoading({ + title: '加载中' + }); + + await Promise.allSettled( + selected.value.map(id => + managerConfirm({ + saleIds: id, + actionType: new Date().getDate() < 25 ? '1' : '0' + }) + ) + ) + selected.value = [] + totalMoney.value = 0 + await handleQuery() + uni.showToast({ + title: '操作成功', + icon: 'none', + duration: 2000 + }); + uni.hideLoading() + } else if (res.cancel) { + uni.showToast({ + title: '用户取消操作', + icon: 'none', + duration: 2000 + }); + + } + } + }); + } const selectionChange = (payload) => {