From bc896d6bc8f7cb558d1db8c31b8c846a460e8889 Mon Sep 17 00:00:00 2001 From: shenzhouyu Date: Mon, 9 Feb 2026 15:56:36 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=86=E6=96=99=E5=BB=B6=E8=AF=AF=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../searchOvertimeMaterialList.vue | 145 +++++++++++++++++- 1 file changed, 138 insertions(+), 7 deletions(-) diff --git a/src/views/modules/orderIssure/soIssueNotify/searchOvertimeMaterialList.vue b/src/views/modules/orderIssure/soIssueNotify/searchOvertimeMaterialList.vue index 17df698..059c508 100644 --- a/src/views/modules/orderIssure/soIssueNotify/searchOvertimeMaterialList.vue +++ b/src/views/modules/orderIssure/soIssueNotify/searchOvertimeMaterialList.vue @@ -43,8 +43,12 @@ - - + @@ -55,7 +59,12 @@ - + @@ -142,6 +151,11 @@ import { getSoundBoxVolume, } from '@/api/orderIssure/soIssueNotify.js' import { getEamWorkShop } from '@/api/factory/site.js' +import {userFavoriteList} from '@/api/userFavorite.js' + import { + getTableDefaultListLanguage, + getTableUserListLanguage, + } from "@/api/table.js" export default { data() { @@ -156,9 +170,9 @@ export default { userName: '', componentPartNo: '', partDesc: '', - status: '', // 默认:已下达 + status: '', // 默认:已下达s confirmStatus: '', // 未确认 - timeoutReason: 'isemtpy', // 配料状态:全部 + timeoutReasons: ['isemtpy'], // 配料状态:多选数组 workShopList: [], startDate: this.dayjs().subtract(7, 'day').format('YYYY-MM-DD'), // 默认:当前日期往前一周 endDate: this.dayjs().format('YYYY-MM-DD'), @@ -180,6 +194,7 @@ export default { { label: '产线申请过多', value: '产线申请过多' }, { label: '产线取消', value: '产线取消' }, ], + favorite: false, columnList1: [ { userId: this.$store.state.user.name, @@ -235,7 +250,7 @@ export default { fixed: '', columnWidth: 100, }, - { + /* { userId: this.$store.state.user.name, functionId: 701005, serialNumber: '701005Table1NotifyNo', @@ -252,7 +267,7 @@ export default { status: true, fixed: '', columnWidth: 120, - }, + }, */ { userId: this.$store.state.user.name, functionId: 701005, @@ -381,6 +396,24 @@ export default { fixed: '', columnWidth: 100, }, + { + userId: this.$store.state.user.name, + functionId: 701005, + serialNumber: '701005Table1NotifyNo', + tableId: '701005Table1', + tableName: '领料延误预警', + columnProp: 'EnteredDate', + headerAlign: 'center', + align: 'center', + columnLabel: '申请时间', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 130, + }, { userId: this.$store.state.user.name, functionId: 701005, @@ -509,7 +542,105 @@ export default { this.searchTable() }) }, + created () { + // 按钮控制 + // this.getButtonAuthData() + // 获取用户的 site 和 bu + // this.getSiteAndBuByUserName() + // 校验用户是否收藏 + this.favoriteIsOk() + + // 动态列 + this.getTableUserColumn(this.$route.meta.menuId+'table1',1) + /* this.getTableUserColumn(this.$route.meta.menuId+'table2',2) + this.getTableUserColumn(this.$route.meta.menuId+'table3',3) + this.getTableUserColumn(this.$route.meta.menuId+'table4',4) + this.getTableUserColumn(this.$route.meta.menuId+'table5',5) */ + // if (!this.authSearch) { + // // 获取数据列表 + // this.getDataList() + // } + }, methods: { + favoriteIsOk () { + let userFavorite = { + userId: this.$store.state.user.id, + languageCode: this.$i18n.locale + } + userFavoriteList(userFavorite).then(({data}) => { + for (let i = 0; i < data.list.length; i++) { + if (this.$route.meta.menuId === data.list[i].menuId) { + this.favorite = true + } + } + }) + }, + async getTableUserColumn(tableId, columnId) { + let queryTableUser = { + userId: this.$store.state.user.name, + functionId: this.$route.meta.menuId, + tableId: tableId, + status: true, + languageCode: this.$i18n.locale + } + await getTableUserListLanguage(queryTableUser).then(({data}) => { + if (data.rows.length > 0) { + //this.columnList1 = [] + switch (columnId) { + case 1: + this.columnList1 = data.rows + break; + case 2: + this.columnList2 = data.rows + break; + case 3: + this.columnList3 = data.rows + break; + case 4: + this.columnList4 = data.rows + break; + case 5: + this.columnList5 = data.rows + break; + } + } else { + this.getColumnList(tableId, columnId) + } + }) + }, + + // 获取 tableDefault 列 + async getColumnList (tableId, columnId) { + let queryTable= { + functionId: this.$route.meta.menuId, + tableId: tableId, + languageCode: this.$i18n.locale + } + await getTableDefaultListLanguage(queryTable).then(({data}) => { + if (!data.rows.length == 0) { + switch (columnId) { + case 1: + this.columnList1 = data.rows + break; + case 2: + this.columnList2 = data.rows + break; + case 3: + this.columnList3 = data.rows + break; + case 4: + this.columnList4 = data.rows + break; + case 5: + this.columnList5 = data.rows + break; + } + } else { + // this.showDefault = true. + } + }) + + }, searchTable() { this.dataListLoading = true const inData = Object.assign({}, this.searchData)