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 |   83 +++++++++++++++++++++++++++++++++++++++--
 1 files changed, 79 insertions(+), 4 deletions(-)

diff --git a/src/views/accounting/jmreport/index.vue b/src/views/accounting/jmreport/index.vue
index 0d5f8ab..3996c08 100644
--- a/src/views/accounting/jmreport/index.vue
+++ b/src/views/accounting/jmreport/index.vue
@@ -42,7 +42,7 @@
                 isShowHide: true, // 鏄惁鏄剧ず鏄惧奖鎸夐挳H
                 isSearch: true, // 楂樼骇鏌ヨ鎸夐挳
                 defaultOrderBy: { column: 'createTime', direction: 'desc' },
-                cancelRunCreated: true
+                cancelRunCreated: false
             },
             table: {
                 total: 0,
@@ -53,9 +53,75 @@
                 column: [
                     {
                         minWidth: '100',
-                        width: '100px',
-                        prop: 'contractNo',
-                        label: '鍚堝悓缂栧彿',
+                        prop: 'createTime',
+                        label: '鐢熶骇鏃ユ湡',
+                        sort: true,
+                        isTrue: true,
+                        isSearch: true,
+                        searchInfoType: 'date',
+                        formatter: this.formatDutyDate,
+                    },
+                    {
+                        minWidth: '100',
+                        prop: 'workShop',
+                        label: '杞﹂棿',
+                        isTrue: true,
+                        isSearch: true,
+                        searchInfoType: 'text',
+                    },
+                    {
+                        minWidth: '100',
+                        prop: 'partName',
+                        label: '鐢熶骇闆朵欢',
+                        isTrue: true,
+                        isSearch: true,
+                        searchInfoType: 'text',
+                    },
+                    {
+                        minWidth: '100',
+                        prop: 'partNo',
+                        label: '鐢熶骇闆朵欢鍙�',
+                        isTrue: true,
+                        isSearch: true,
+                        searchInfoType: 'text',
+                    },
+                    {
+                        minWidth: '100',
+                        prop: 'staffName',
+                        label: '鐢熶骇浜哄憳',
+                        isTrue: true,
+                        isSearch: true,
+                        searchInfoType: 'text',
+                    },
+                    {
+                        minWidth: '100',
+                        prop: 'operation',
+                        label: '宸ュ簭',
+                        isTrue: true,
+                        isSearch: true,
+                        searchInfoType: 'text',
+                    },
+                    {
+                        minWidth: '100',
+                        prop: 'workSum',
+                        label: '鎶ュ伐鎬绘暟閲�',
+                        sort: true,
+                        isTrue: true,
+                        isSearch: true,
+                        searchInfoType: 'text',
+                    },
+                    {
+                        minWidth: '100',
+                        prop: 'unit',
+                        label: '鍗曚綅',
+                        isTrue: true,
+                        isSearch: true,
+                        searchInfoType: 'text',
+                    },
+                    {
+                        minWidth: '100',
+                        prop: 'workTotal',
+                        label: '鎶ュ伐鎬绘鏁�',
                         sort: true,
                         isTrue: true,
                         isSearch: true,
@@ -73,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