From 67b8c895a338417902cf46389e433f154e3a805c Mon Sep 17 00:00:00 2001 From: songguoqiang Date: Wed, 2 Jul 2025 11:20:32 +0800 Subject: [PATCH] =?UTF-8?q?YT-2847:=E8=A6=81=E8=B4=A7=E9=A2=84=E6=B5=8B-?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=91=98=EF=BC=8C=E6=9C=AA=E5=8B=BE=E9=80=89?= =?UTF-8?q?=E8=A6=81=E8=B4=A7=E9=A2=84=E6=B5=8B=E6=95=B0=E6=8D=AE=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E6=89=B9=E9=87=8F=E5=8F=91=E5=B8=83=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demandforecastingMain/index.vue | 32 +++++++++++++++++-- .../supplierinvoiceInvoiced.data.ts | 7 ++-- 2 files changed, 33 insertions(+), 6 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue index 428734bb5..a5f307d74 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue @@ -78,6 +78,7 @@ import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' import { isString } from '@/utils/is' import {publish} from "@/api/wms/demandforecastingMain"; +import { disable } from '@/api/infra/outerApiHis' const { loadStart, loadDone } = usePageLoading() // 要货预测 @@ -223,7 +224,7 @@ const butttondata = (row,$index) => { { label: t(`ts.生成要货计划`).replace('ts.', ''), name: 'previewPlan', - hide: isShowMainButton(row, ['2']) || !(row['planType_F'].length>0&&(!tableObject.params.version || tableObject.params.version.length == 0)), + hide: isShowMainButton(row, ['2']) || !(row['planType_F'].length>0&&(!tableObject.params.version || tableObject.params.version.length == 0)) || row.isMaxScpVersion == '1', type: 'primary', color: '', link: true, // 文本展现按钮 @@ -232,7 +233,7 @@ const butttondata = (row,$index) => { { label: '发布', name: 'publish', - hide: isShowMainButton(row, ['1']), + hide: isShowMainButton(row, ['1']) || row.isMaxScpVersion == '1', type: 'primary', color: '', link: true, // 文本展现按钮 @@ -290,11 +291,23 @@ const { tableObject:tableObjectPlan, tableMethods:tableMethodsPlan } = useTable( const { getList:getListPlan} = tableMethodsPlan // 批量生成要货计划 const selectionPlan = async ()=>{ + if(!tableObject.tableList || tableObject.tableList.length === 0){ + return + } + if(tableObject.tableList[0].isMaxScpVersion == '1'){ + message.alert('选择版本号时无法生成要货计划选中!'); + return; + } let rows: any = [] selectionRows.value.forEach((item) => { rows = [...rows, ...item.selectionRows.map((item1) => item1.mainId)] }) console.log('批量生成要货计划', rows.join(',')) + if(!rows || rows.length ===0){ + message.alert('勾选数据不能为空!'); + return + } + console.log('批量生成要货计划', rows.join(',')) tableObjectPlan.params.masterIds = rows.join(',') tableObjectPlan.params.dueDate = tableObject.params.dueDate handlePreviewPlan() @@ -372,12 +385,25 @@ const getSelectionRowsPlan = (currentPage, currentPageSelectionRows) => { // 批量发布 const handleSelectionPublish = async ()=>{ - tableObject.loading = true + if(!tableObject.tableList || tableObject.tableList.length === 0){ + message.alert('选择版本号时无法批量发布选中!'); + return + } + if(tableObject.tableList[0].isMaxScpVersion == '1'){ + message.alert('选择版本号时无法批量发布选中!'); + return; + } + let rows: any = [] selectionRows.value.forEach((item) => { rows = [...rows, ...item.selectionRows.map((item1) => item1.mainId)] }) console.log('批量生成要货计划', rows.join(',')) + if(!rows || rows.length ===0){ + message.alert('勾选数据不能为空!'); + return + } + tableObject.loading = true let ids = rows.join(',') await DemandforecastingMainApi.batchPublish(ids) .then((res) => { diff --git a/src/views/wms/supplierManage/supplierinvoiceInvoiced/supplierinvoiceInvoiced.data.ts b/src/views/wms/supplierManage/supplierinvoiceInvoiced/supplierinvoiceInvoiced.data.ts index 87ba7f281..b0eb973a4 100644 --- a/src/views/wms/supplierManage/supplierinvoiceInvoiced/supplierinvoiceInvoiced.data.ts +++ b/src/views/wms/supplierManage/supplierinvoiceInvoiced/supplierinvoiceInvoiced.data.ts @@ -48,6 +48,7 @@ export const SupplierinvoiceInvoiced = useCrudSchemas(reactive([ label: '供应商送货日期', field: 'supplierDeliveryTime', sort: 'custom', + hiddenSearchHigh:true, formatter: dateFormatter2, search: { component: 'DatePicker', @@ -89,9 +90,9 @@ export const SupplierinvoiceInvoiced = useCrudSchemas(reactive([ component: 'DatePicker', componentProps: { style: {width:'100%'}, - type: 'datetime', - dateFormat: 'YYYY-MM-DD HH:mm:ss', - valueFormat: 'x', + type: 'date', + dateFormat: 'YYYY-MM-DD', + valueFormat: 'YYYY-MM-DD', } }, table: {