Browse Source

三个月

master_hella_20240701
wangyufei 5 months ago
parent
commit
5e349c4f6a
  1. 3
      src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/demandforecastingMain.data.ts
  2. 3
      src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/demandforecastingMain.data.ts
  3. 12
      src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue

3
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 { PurchaseDetail, PurchaseMain } from '../purchaseMain/purchaseMain.data'
import * as DemandforecastingMainApi from '@/api/wms/demandforecastingMain' import * as DemandforecastingMainApi from '@/api/wms/demandforecastingMain'
import * as DemandforecastingDetailApi from '@/api/wms/demandforecastingDetail' import * as DemandforecastingDetailApi from '@/api/wms/demandforecastingDetail'
import dayjs from 'dayjs'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
let planerList = await DemandforecastingMainApi.queryUserPlanerList() let planerList = await DemandforecastingMainApi.queryUserPlanerList()
@ -258,8 +259,8 @@ export const DemandforecastingMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable:false, isTable:false,
isForm: false, isForm: false,
search: { search: {
value:[],
component: 'DatePicker', component: 'DatePicker',
value: [dayjs(), dayjs().subtract(-3,'month')],
componentProps: { componentProps: {
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',
type: 'daterange', type: 'daterange',

3
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 { PurchaseDetail, PurchaseMain } from '../purchaseMain/purchaseMain.data'
import * as DemandforecastingMainApi from '@/api/wms/demandforecastingMain' import * as DemandforecastingMainApi from '@/api/wms/demandforecastingMain'
import * as DemandforecastingDetailApi from '@/api/wms/demandforecastingDetail' import * as DemandforecastingDetailApi from '@/api/wms/demandforecastingDetail'
import dayjs from 'dayjs'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
@ -159,7 +160,7 @@ export const DemandforecastingMain = useCrudSchemas(reactive<CrudSchema[]>([
isTable:false, isTable:false,
isForm: false, isForm: false,
search: { search: {
value:[], value: [dayjs(), dayjs().subtract(-3,'month')],
component: 'DatePicker', component: 'DatePicker',
componentProps: { componentProps: {
valueFormat: 'YYYY-MM-DD', valueFormat: 'YYYY-MM-DD',

12
src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue

@ -229,6 +229,10 @@ const getSelectionRows = (currentPage,currentPageSelectionRows) => {
const readHandle = (row,isAll)=>{ const readHandle = (row,isAll)=>{
let rows:any = [] let rows:any = []
if(isAll){ if(isAll){
//
if(selectionRows.value==0){
return
}
selectionRows.value.forEach(item=>{ selectionRows.value.forEach(item=>{
let itemSelectionRows = item.selectionRows.filter(item1=>item1.isRead==0) let itemSelectionRows = item.selectionRows.filter(item1=>item1.isRead==0)
console.log('itemSelectionRows',itemSelectionRows) console.log('itemSelectionRows',itemSelectionRows)
@ -237,17 +241,19 @@ const readHandle = (row,isAll)=>{
console.log('selectionRows',selectionRows) console.log('selectionRows',selectionRows)
console.log('全部已读',rows.join(',')) console.log('全部已读',rows.join(','))
}else{ }else{
//
if(row.isRead==1){
return
}
rows = [row.mainId] rows = [row.mainId]
console.log('已读',rows.join(',')) console.log('已读',rows.join(','))
} }
let getLoading = ElLoading.service({ let getLoading = ElLoading.service({
lock: true, lock: true,
text: 'loading...', text: 'loading...',
background: 'rgba(0, 0, 0, 0.7)' background: 'rgba(0, 0, 0, 0.7)'
}) })
if(selectionRows.value==0){
return
}
DemandforecastingMainApi.updateIsRead({isReadMainIds:rows.join(',')}).then(res => { DemandforecastingMainApi.updateIsRead({isReadMainIds:rows.join(',')}).then(res => {
console.log('res',res); console.log('res',res);
getLoading?.close() getLoading?.close()

Loading…
Cancel
Save