From e8b88946979f6f503fa547a5a1b82539022057e8 Mon Sep 17 00:00:00 2001
From: zhang_li
Date: Mon, 31 Mar 2025 17:16:52 +0800
Subject: [PATCH] =?UTF-8?q?YT-2164SCP=E3=80=8A=E5=BE=85=E5=BC=80=E7=A5=A8?=
=?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9F=A5=E8=AF=A2-=E5=B7=A5=E5=8A=A1?=
=?UTF-8?q?=E3=80=8B=E5=A2=9E=E5=8A=A0=E6=89=B9=E9=87=8F=E9=80=9A=E8=BF=87?=
=?UTF-8?q?=E6=8C=89=E9=92=AE=EF=BC=8C=E5=8B=BE=E9=80=89=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E5=90=8E=E5=8F=AF=E4=BB=A5=E6=89=B9=E9=87=8F=E5=AE=A1=E6=A0=B8?=
=?UTF-8?q?=E9=80=9A=E8=BF=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/wms/supplierinvoiceInvoiced/index.ts | 4 +++
src/utils/disposition/defaultButtons.ts | 14 ++++++++-
.../demandforecastingMain/index.vue | 2 ++
.../supplierinvoiceInvoiced/index.vue | 30 ++++++++++++++++++-
4 files changed, 48 insertions(+), 2 deletions(-)
diff --git a/src/api/wms/supplierinvoiceInvoiced/index.ts b/src/api/wms/supplierinvoiceInvoiced/index.ts
index 85baf8e41..1a2a3fcde 100644
--- a/src/api/wms/supplierinvoiceInvoiced/index.ts
+++ b/src/api/wms/supplierinvoiceInvoiced/index.ts
@@ -75,4 +75,8 @@ export const agreeSupplierinvoiceInvoiced = async (id: number) => {
// 审批拒绝待开票
export const refuseSupplierinvoiceInvoiced = async (id: number) => {
return await request.post({ url: `/wms/supplierinvoice-invoiced/refuse?id=` + id })
+}
+// 批量通过
+export const batchPasslist = async (data) => {
+ return await request.post({ url: `/wms/supplierinvoice-invoiced/batchPasslist`, data })
}
\ No newline at end of file
diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts
index 0bee6993c..78e2826d3 100644
--- a/src/utils/disposition/defaultButtons.ts
+++ b/src/utils/disposition/defaultButtons.ts
@@ -798,7 +798,19 @@ export function mainListPlanCloBtn(option: any) {
hasPermi: ''
})
}
-
+// 主列表-批量通过
+export function mainListSelectionOrderPassBtn(option: any) {
+ return __defaultBtnOption(option, {
+ label: t(`ts.批量通过`).replace('ts.', ''),
+ name: 'mainOrderSelectionPass',
+ hide: false,
+ type: 'primary',
+ color: '',
+ float: 'left',
+ link: false, // 文本展现按钮
+ hasPermi: ''
+ })
+}
// 主列表-批量重试按钮
export function mainListSelectionReTryBtn(option: any) {
return __defaultBtnOption(option, {
diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue
index 5bc12936e..2381af75f 100644
--- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue
+++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue
@@ -29,6 +29,8 @@
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
@getSelectionRows="getSelectionRows"
+ :reserve-selection="true"
+ row-key="id"
>
{{ row[name] }}
diff --git a/src/views/wms/supplierManage/supplierinvoiceInvoiced/index.vue b/src/views/wms/supplierManage/supplierinvoiceInvoiced/index.vue
index 671d71571..85bafa278 100644
--- a/src/views/wms/supplierManage/supplierinvoiceInvoiced/index.vue
+++ b/src/views/wms/supplierManage/supplierinvoiceInvoiced/index.vue
@@ -18,6 +18,7 @@
@@ -117,6 +121,7 @@ const HeadButttondata = [
// defaultButtons.defaultAddBtn({hasPermi:'wms:supplierinvoice-invoiced:create'}), // 新增
// defaultButtons.defaultImportBtn({hasPermi:'wms:supplierinvoice-invoiced:import'}), // 导入
defaultButtons.defaultExportBtn(null), // 导出
+ defaultButtons.mainListSelectionOrderPassBtn(null), //批量通过
defaultButtons.defaultFreshBtn(null), // 刷新
defaultButtons.defaultFilterBtn(null), // 筛选
defaultButtons.defaultSetBtn(null), // 设置
@@ -141,6 +146,8 @@ const buttonBaseClick = (val, item) => {
} else if (val == 'refresh') { // 刷新
getList()
} else if (val == 'filtrate') { // 筛选
+ } else if (val == 'mainOrderSelectionPass') { // 批量通过
+ handleBatchPass()
} else { // 其他按钮
console.log('其他按钮', item)
}
@@ -340,7 +347,28 @@ const getFiled=()=> {
tableColumns .value= SupplierinvoiceInvoicedAllSchemas.value.allSchemas.tableColumns
}
}
-
+const currentPageSelectionList = ref([])
+const getSelectionRows = (currentPage, currentPageSelectionRows) => {
+ currentPageSelectionList.value = currentPageSelectionRows
+}
+// 批量通过
+const handleBatchPass =async () => {
+ tableObject.loading = true
+// let rows: any = []
+// selectionRows.value.forEach((item) => {
+// rows = [...rows, ...item.selectionRows.map((item1) => item1.mainId)]
+// })
+// console.log('批量生成要货计划', rows.join(','))
+ let ids = currentPageSelectionList.value.map(item => item.id).join(',')
+ await SupplierinvoiceInvoicedApi.batchPasslist({ ids: ids }).then((res) => {
+ message.success(res.message)
+ tableObject.loading = false
+ buttonBaseClick('refresh', null)
+ }).catch((err) => {
+ tableObject.loading = false
+ console.log(err)
+ })
+}
/** 初始化 **/
onMounted(async () => {
await getList()