From c5dcef375b689fd96175302fb7bf83641d1f57a8 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期一, 27 五月 2024 11:16:41 +0800 Subject: [PATCH] 核算统计增加工序字段 --- src/views/accounting/jmreport/index.vue | 23 ++++++++++++++++++----- 1 files changed, 18 insertions(+), 5 deletions(-) diff --git a/src/views/accounting/jmreport/index.vue b/src/views/accounting/jmreport/index.vue index 5837437..3996c08 100644 --- a/src/views/accounting/jmreport/index.vue +++ b/src/views/accounting/jmreport/index.vue @@ -59,12 +59,12 @@ isTrue: true, isSearch: true, searchInfoType: 'date', + formatter: this.formatDutyDate, }, { minWidth: '100', prop: 'workShop', label: '杞﹂棿', - sort: true, isTrue: true, isSearch: true, searchInfoType: 'text', @@ -73,7 +73,6 @@ minWidth: '100', prop: 'partName', label: '鐢熶骇闆朵欢', - sort: true, isTrue: true, isSearch: true, searchInfoType: 'text', @@ -82,7 +81,6 @@ minWidth: '100', prop: 'partNo', label: '鐢熶骇闆朵欢鍙�', - sort: true, isTrue: true, isSearch: true, searchInfoType: 'text', @@ -91,7 +89,14 @@ minWidth: '100', prop: 'staffName', label: '鐢熶骇浜哄憳', - sort: true, + isTrue: true, + isSearch: true, + searchInfoType: 'text', + }, + { + minWidth: '100', + prop: 'operation', + label: '宸ュ簭', isTrue: true, isSearch: true, searchInfoType: 'text', @@ -109,7 +114,6 @@ minWidth: '100', prop: 'unit', label: '鍗曚綅', - sort: true, isTrue: true, isSearch: true, searchInfoType: 'text', @@ -135,6 +139,15 @@ handleSelectionChange(val) { this.multipleSelection = val }, + formatDutyDate(row, column, cellValue) { + if (cellValue) { + const dutyDateList = /\d{4}-\d{1,2}-\d{1,2}/g.exec(cellValue) + if (dutyDateList && dutyDateList.length > 0) { + return dutyDateList[0] + } + } + return '' + }, } } </script> -- Gitblit v1.9.3