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: {