From a1c5bc3574246e2c14dd67f879a9c48480ba7e83 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Wed, 21 Aug 2024 19:58:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E5=8A=9F=E8=83=BD=E6=9F=A5?= =?UTF-8?q?=E7=BC=BA=E8=A1=A5=E6=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/eam/SparePartsOutLocationRecord/index.vue | 5 ++--- src/views/eam/adjustRecord/index.vue | 5 ++--- src/views/eam/countRecord/index.vue | 5 ++--- src/views/eam/countadjustWork/index.vue | 5 ++--- src/views/eam/sparePartsApplyMain/index.vue | 5 ++--- src/views/eam/sparepartsoutlocation/index.vue | 5 ++--- .../unplannedissue/unplannedissueJobMain/index.vue | 3 +-- .../inventorychangeRequestMain/index.vue | 7 ++++--- .../productionMain/productionMain.data.ts | 3 +++ .../productionplan/productionMainAssemble/index.vue | 10 ++++++---- .../productionMainAssemble.data.ts | 3 +++ .../productionMainAssembleSparePart/index.vue | 10 ++++++---- .../productionMainAssembleSparePart.data.ts | 3 +++ .../productionMainPredictSparePart/index.vue | 10 ++++++---- .../productionMainPredictSparePart.data.ts | 3 +++ .../supplierdeliver/purchaseMainWms/index.vue | 8 ++++---- 16 files changed, 51 insertions(+), 39 deletions(-) diff --git a/src/views/eam/SparePartsOutLocationRecord/index.vue b/src/views/eam/SparePartsOutLocationRecord/index.vue index a3ad1fa09..b222e423b 100644 --- a/src/views/eam/SparePartsOutLocationRecord/index.vue +++ b/src/views/eam/SparePartsOutLocationRecord/index.vue @@ -259,18 +259,17 @@ const handleDelete = async (id: number) => { } /** 列表导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleMainExport = async (id: number) => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await SparePartsOutLocationRecordMainApi.exportSparePartsOutLocationRecordMain(id) download.excel(data, '盘点工单.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/adjustRecord/index.vue b/src/views/eam/adjustRecord/index.vue index 0300f868b..bd52a273f 100644 --- a/src/views/eam/adjustRecord/index.vue +++ b/src/views/eam/adjustRecord/index.vue @@ -209,18 +209,17 @@ } /** 列表导出按钮操作 */ - const exportLoading = ref(false) // 导出的加载中 const handleMainExport = async (id : number) => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await AdjustRecordMainApi.exportAdjustRecordMain(id) download.excel(data, '盘点工单.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/countRecord/index.vue b/src/views/eam/countRecord/index.vue index 086e0ca4b..b9302acde 100644 --- a/src/views/eam/countRecord/index.vue +++ b/src/views/eam/countRecord/index.vue @@ -225,18 +225,17 @@ /** 列表导出按钮操作 */ - const exportLoading = ref(false) // 导出的加载中 const handleMainExport = async (id : number) => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await CountRecordMainApi.handleMainExport(id) download.excel(data, '盘点工单.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/countadjustWork/index.vue b/src/views/eam/countadjustWork/index.vue index bcdbff7ea..edbe2f679 100644 --- a/src/views/eam/countadjustWork/index.vue +++ b/src/views/eam/countadjustWork/index.vue @@ -260,18 +260,17 @@ const handleDelete = async (id: number) => { } /** 列表导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleMainExport = async (id: number) => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await CountJobMainApi.handleMainExport(id) download.excel(data, '盘点工单.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/sparePartsApplyMain/index.vue b/src/views/eam/sparePartsApplyMain/index.vue index 943371b24..aaf5fb3a9 100644 --- a/src/views/eam/sparePartsApplyMain/index.vue +++ b/src/views/eam/sparePartsApplyMain/index.vue @@ -316,18 +316,17 @@ const handleDelete = async (id: number) => { } /** 列表导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleMainExport = async (id: number) => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await SparePartsApplyMainApi.exportSparePartsApplyMain(id) download.excel(data, '盘点工单.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/eam/sparepartsoutlocation/index.vue b/src/views/eam/sparepartsoutlocation/index.vue index 64f8bcc05..e9532a17e 100644 --- a/src/views/eam/sparepartsoutlocation/index.vue +++ b/src/views/eam/sparepartsoutlocation/index.vue @@ -284,18 +284,17 @@ const handleDelete = async (id: number) => { } /** 列表导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleMainExport = async (id: number) => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await SparePartsOutLocationMainApi.exportSparePartsOutLocationMain(id) download.excel(data, '盘点工单.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/index.vue index 475bcadb2..86cbdaee2 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/index.vue @@ -224,7 +224,6 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 @@ -236,7 +235,7 @@ const handleExport = async () => { download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue index 21289bbea..233af5368 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRequestMain/index.vue @@ -106,6 +106,8 @@ import * as InventorychangeRequestMainApi from '@/api/wms/inventorychangeRequest import * as InventorychangeRequestDetailApi from '@/api/wms/inventorychangeRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() const message = useMessage() // 消息弹窗 @@ -398,19 +400,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await InventorychangeRequestMainApi.exportInventorychangeRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts index f54be98de..5042e58f1 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMain/productionMain.data.ts @@ -743,6 +743,9 @@ export const ProductionDetail = useCrudSchemas(reactive([ componentProps:{ disabled: true } + }, + tableForm:{ + disabled: true } }, { diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue index 3c9e4ce62..a5335ec3c 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue @@ -90,7 +90,8 @@ import * as ItemBasicApi from '@/api/wms/itembasic' import * as BomApi from "@/api/wms/bom"; import * as SwitchApi from '@/api/wms/switch' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 装配计划 defineOptions({ name: 'ProductionMainAssemble' }) @@ -131,6 +132,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) newRow[formField] = item[searchField] newRow['uom'] = item['uom'] + newRow['itemName'] = item['itemName'] + // 查看BOM版本 const param1 = { productItemCode: item['itemCode'], @@ -505,19 +508,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductionMainApi.exportProductionMainAssemble(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts b/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts index a68c9f096..e4b002ef2 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/productionMainAssemble.data.ts @@ -743,6 +743,9 @@ export const ProductionDetail = useCrudSchemas(reactive([ disabled: true } }, + tableForm:{ + disabled: true + } }, { label: 'Bom版本', diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue index 635a26584..5f1d7a00b 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue @@ -90,7 +90,8 @@ import * as ItemBasicApi from '@/api/wms/itembasic' import * as BomApi from "@/api/wms/bom"; import * as SwitchApi from '@/api/wms/switch' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 装配备件计划 defineOptions({ name: 'ProductionMainASparePart' }) @@ -124,6 +125,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) newRow[formField] = item[searchField] newRow['uom'] = item['uom'] + newRow['itemName'] = item['itemName'] + // 查看BOM版本 const param1 = { productItemCode: item['itemCode'], @@ -493,18 +496,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductionMainApi.exportProductionMainAssembleSparePart(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts index 01e34f445..81391162f 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/productionMainAssembleSparePart.data.ts @@ -742,6 +742,9 @@ export const ProductionDetail = useCrudSchemas(reactive([ table: { width: 150 }, + tableForm:{ + disabled: true + } }, { label: 'Bom版本', diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue index 3cb8bb4d0..a75670988 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue @@ -90,7 +90,8 @@ import * as ItemBasicApi from '@/api/wms/itembasic' import * as BomApi from "@/api/wms/bom"; import * as SwitchApi from '@/api/wms/switch' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 预生产备件计划 defineOptions({ name: 'ProductionMainPredictSparePart' }) @@ -124,6 +125,8 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) newRow[formField] = item[searchField] newRow['uom'] = item['uom'] + newRow['itemName'] = item['itemName'] + // 查看BOM版本 const param1 = { productItemCode: item['itemCode'], @@ -495,19 +498,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductionMainApi.exportProductionMainPredictSparePart(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts index 82a6ceb40..47012f6f5 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/productionMainPredictSparePart.data.ts @@ -730,6 +730,9 @@ export const ProductionDetail = useCrudSchemas(reactive([ table: { width: 150 }, + tableForm:{ + disabled: true + } }, { label: 'Bom版本', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMainWms/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMainWms/index.vue index 9af189025..e526f7ef9 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMainWms/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchaseMainWms/index.vue @@ -101,7 +101,8 @@ import * as ItembasicApi from '@/api/wms/itembasic' import TableDetail from '@/components/TableDetail/src/TableDetail.vue' import { formatDate } from '@/utils/formatTime' - + import { usePageLoading } from '@/hooks/web/usePageLoading' + const { loadStart, loadDone } = usePageLoading() // 采购订单 defineOptions({ name: 'PurchaseMain' }) @@ -487,19 +488,18 @@ console.log('PurchaseMain.allSchemas.searchSchema',PurchaseMain.allSchemas.searc } /** 导出按钮操作 */ - const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PurchaseMainApi.exportPurchaseMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } }