diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts index 474482084..5fe1b92eb 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts @@ -12,6 +12,7 @@ import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' import { PurchaseDetail, PurchaseMain } from '../purchaseMain/purchaseMain.data' import * as DemandforecastingMainApi from '@/api/wms/demandforecastingMain' import * as DemandforecastingDetailApi from '@/api/wms/demandforecastingDetail' +import dayjs from 'dayjs' const { t } = useI18n() // 国际化 let planerList = await DemandforecastingMainApi.queryUserPlanerList() @@ -258,8 +259,8 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ isTable:false, isForm: false, search: { - value:[], component: 'DatePicker', + value: [dayjs(), dayjs().subtract(-3,'month')], componentProps: { valueFormat: 'YYYY-MM-DD', type: 'daterange', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts index c1a3a17cf..b094557b3 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts @@ -11,6 +11,7 @@ import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' import { PurchaseDetail, PurchaseMain } from '../purchaseMain/purchaseMain.data' import * as DemandforecastingMainApi from '@/api/wms/demandforecastingMain' import * as DemandforecastingDetailApi from '@/api/wms/demandforecastingDetail' +import dayjs from 'dayjs' const { t } = useI18n() // 国际化 @@ -159,7 +160,7 @@ export const DemandforecastingMain = useCrudSchemas(reactive([ isTable:false, isForm: false, search: { - value:[], + value: [dayjs(), dayjs().subtract(-3,'month')], component: 'DatePicker', componentProps: { valueFormat: 'YYYY-MM-DD', diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue index 556415855..726a18a00 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue @@ -229,6 +229,10 @@ const getSelectionRows = (currentPage,currentPageSelectionRows) => { const readHandle = (row,isAll)=>{ let rows:any = [] if(isAll){ + //全部已读 + if(selectionRows.value==0){ + return + } selectionRows.value.forEach(item=>{ let itemSelectionRows = item.selectionRows.filter(item1=>item1.isRead==0) console.log('itemSelectionRows',itemSelectionRows) @@ -237,17 +241,19 @@ const readHandle = (row,isAll)=>{ console.log('selectionRows',selectionRows) console.log('全部已读',rows.join(',')) }else{ + //单行 + if(row.isRead==1){ + return + } rows = [row.mainId] console.log('已读',rows.join(',')) } + let getLoading = ElLoading.service({ lock: true, text: 'loading...', background: 'rgba(0, 0, 0, 0.7)' }) - if(selectionRows.value==0){ - return - } DemandforecastingMainApi.updateIsRead({isReadMainIds:rows.join(',')}).then(res => { console.log('res',res); getLoading?.close()