From 727971fc438644a9a540e1b0e98834def92799d3 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期六, 16 八月 2025 23:26:07 +0800
Subject: [PATCH] 导出dnc增加工序号

---
 src/views/flowmgr/processQuery.vue |  432 +++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 382 insertions(+), 50 deletions(-)

diff --git a/src/views/flowmgr/processQuery.vue b/src/views/flowmgr/processQuery.vue
index 0dda096..f3c6060 100644
--- a/src/views/flowmgr/processQuery.vue
+++ b/src/views/flowmgr/processQuery.vue
@@ -1,7 +1,7 @@
 <!--
  * @Date: 2025-06-18 09:17:09
  * @LastEditors: gaoshp
- * @LastEditTime: 2025-07-22 22:54:40
+ * @LastEditTime: 2025-08-09 20:55:52
  * @FilePath: /mdmweb/src/views/flowmgr/processQuery.vue
 -->
 <template>
@@ -10,6 +10,12 @@
             @search-change="searchChange" @search-reset="searchReset" @current-change="currentChange"
             @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"
             @selection-change="selectionChange">
+            <template slot="view" slot-scope="{ row }">
+              <div class="custom-view-footer">
+                <p>杩欐槸鑷畾涔夌殑搴曢儴鍐呭</p>
+                <p>褰撳墠琛屾暟鎹細{{ row }}</p>
+              </div>
+            </template>
             <template #menu-left>
                 <!-- <el-button type="primary" plain @click="exportWebSite">瀵煎嚭鍥炰紶娑夊瘑缃�</el-button> -->
                 <!-- <el-button type="primary" plain @click="reassign">鎸傝浇杞﹀簥绋嬪簭搴�</el-button> -->
@@ -18,6 +24,8 @@
                 </el-button>
             </template>
             <template #menu="scope">
+                <el-button type="primary" text size="default" @click.stop="customView(scope.row, scope.index, 0)">鏌ョ湅
+                </el-button>
                 <el-button type="primary" text size="default" v-if="scope.row.processDefinitionKey === 'dispatch'"
                     @click.stop="handleAction(scope.row, scope.index, 1)">瀹℃壒琛ㄦ墦鍗�
                 </el-button>
@@ -29,6 +37,17 @@
         <el-dialog title="鎸囨淳" append-to-body v-model="reassignBox" width="30%">
             <avue-form ref="reassginform" :option="reassignOption" v-model="reassignForm"
                 @submit="toPerson"></avue-form>
+        </el-dialog>
+
+        <el-dialog title="鏌ョ湅璇︽儏" v-model="dialogVisible" width="60%">
+            <avue-form v-model="viewRow" :option="viewFormOption" readonly class="viewRowForm"></avue-form>
+            <el-table :data="tableData" style="width: 100%">
+                <el-table-column prop="assigneeName" label="鎵ц浜�" />
+                <el-table-column prop="taskName" label="浠诲姟鍚嶇О" />
+                <el-table-column prop="comment" label="鎵规敞" />
+                <el-table-column prop="createTime" label="寮�濮嬫椂闂�" />
+                <el-table-column prop="endTime" label="瀹屾垚鏃堕棿" />
+            </el-table>
         </el-dialog>
     </basic-container>
 </template>
@@ -45,6 +64,8 @@
     name: 'MachineReturnFileOp',
     data() {
         return {
+            tableData: [],
+            viewRow: {},
             page: {
                 pageSize: 10,
                 currentPage: 1,
@@ -58,13 +79,13 @@
                 addBtn: false,
                 editBtn: false,
                 delBtn: false,
-                viewBtn: true,
+                viewBtn: false,
                 columnBtn: false,
                 tip: false,
                 // simplePage: true,
                 searchShow: true,
-                searchMenuSpan: 6,
-                dialogWidth: '60%',
+                searchMenuSpan: 7,
+                dialogWidth: '70%',
                 // tree: true,
                 border: true,
                 index: true,
@@ -80,7 +101,7 @@
                         search: true,
                         searchType: 'select',
                         hide: true,
-                        dicUrl: `/blade-system/dict/dictionary?code=flow`,
+                        dicUrl: `/blade-mdm/system/dict/dictionary?code=flow`,
                         props: {
                             label: 'dictValue',
                             value: 'remark',
@@ -102,7 +123,135 @@
                         search: true,
                         searchType: 'input',
                         hide: true,
+                        viewDisplay: false,
                     },
+					{
+                        label: '鏍囬',
+                        prop: 'variables.title',
+                        width: 150,
+						render: ({ row }) => {
+                            return h('p',
+                                {
+                                    attrs: {},
+                                    class: {},
+                                    style: {},
+                                }, row?.variables?.title)
+                        },
+                        renderForm: ({ row }) => {
+                            return h('span', {
+                                attrs: {},
+                                class: {},
+                                style: {},
+                            }, row?.variables?.title || '');
+                        }
+                    },
+					{
+                        label: '娴佺▼鍚嶇О',
+                        prop: '',
+                        width: 80,
+						render: ({ row }) => {
+                            return h('p',
+                                {
+                                    attrs: {},
+                                    class: {},
+                                    style: {},
+                                }, row?.variables?.myProcessName)
+                        }
+                    },
+                    {
+                        label: '宸ヨ壓鐗堟',
+                        prop: 'variables.craftEdition',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.craftEdition || '');
+                        }
+                    },
+                    {
+                        label: '宸ュ簭鍙�',
+                        prop: 'processNo',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.processNo || '');
+                        }
+                    },
+                    {
+                        label: '宸ュ簭鍚嶇О',
+                        prop: 'processName',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.processName || '');
+                        }
+                    },
+                    {
+                        label: '宸ュ簭鐗堟',
+                        prop: 'processEdition',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.processEdition || '');
+                        }
+                    },
+                    {
+                        label: '闆剁粍浠跺彿',
+                        prop: 'drawingNo',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.drawingNo || '');
+                        }
+                    },
+                    {
+                        label: '浠诲姟杞﹂棿',
+                        prop: 'workshop',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.workshop || '');
+                        }
+                    },
+                    {
+                        label: '杩囩▼鍗″彿',
+                        prop: 'empty',
+                        width: 80,
+                    },
+					{
+                        label: '鍥惧彿',
+                        prop: '',
+                        width: 100,
+						render: ({ row }) => {
+                            return h('p',
+                                {
+                                    attrs: {},
+                                    class: {},
+                                    style: {},
+                                }, row?.variables?.drawingNo)
+                        },
+                        renderForm: ({ row }) => {
+                            return h('span', {
+                                attrs: {},
+                                class: {},
+                                style: {},
+                            }, row?.variables?.drawingNo || '');
+                        }
+                    },
+					{
+                        label: '浜у搧鍨嬪彿',
+                        prop: '',
+                        width: 100,
+						render: ({ row }) => {
+                            return h('p',
+                                {
+                                    attrs: {},
+                                    class: {},
+                                    style: {},
+                                }, row?.variables?.productModel)
+                        },
+                        renderForm: ({ row }) => {
+                            return h('span', {
+                                attrs: {},
+                                class: {},
+                                style: {},
+                            }, row?.variables?.productModel || '');
+                        }
+                    },
+					
                     {
                         label: '鏈哄簥',
                         prop: '',
@@ -113,23 +262,19 @@
                                     class: {},
                                     style: {},
                                 }, row?.variables?.machineCode)
+                        },
+                        renderForm: ({ row }) => {
+                            return h('span', {
+                                attrs: {},
+                                class: {},
+                                style: {},
+                            }, row?.variables?.machineCode || '');
                         }
                     },
                     {
                         label: '鍒涘缓浜�',
                         prop: 'startUserName',
-                    },
-                    {
-                        label: '宸ュ簭鍚嶇О',
-                        prop: '',
-                        render: ({ row }) => {
-                            return h('p',
-                                {
-                                    attrs: {},
-                                    class: {},
-                                    style: {},
-                                }, row?.variables?.processName)
-                        }
+						width: 80,
                     },
                     {
                         label: '鍒涘缓鏃堕棿',
@@ -138,43 +283,209 @@
                     {
                         label: '褰撳墠鑺傜偣',
                         prop: 'taskName',
+						width: 90
+                    },
+                    {
+                        label: '璁″垝鍔犲伐鏃堕棿',
+                        prop: 'planStartTime',
+                        width: 180,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.planStartTime || '');
+                        }
+                    },
+                    {
+                        label: '绋嬪簭鍖呭悕',
+                        prop: 'programPackageName',
+                        width: 80,
+                        render: ({ row }) => {
+                            return h('span', {}, row?.variables?.programPackageName || '');
+                        }
                     },
                 ],
-                
+            },
+            viewFormOption: {
+                emptyBtn: false,
+                submitBtn: false,
+                menuBtn: false,
+                labelWidth: 100,
+                span: 8,
+                column: [
+                    {
+                        label: '娴佺▼绫诲瀷',
+                        prop: 'processDefinitionKey',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.processDefinitionKey)
+                        },
+                    },
+                    {
+                        label: '鍒涘缓鏃堕棿',
+                        prop: 'createTime',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.createTime)
+                        },
+                    },
+                    {
+                        label: '鏍囬',
+                        prop: 'variables.title',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.title)
+                        }
+                    },
+                    {
+                        label: '娴佺▼鍚嶇О',
+                        prop: '',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables.myProcessName)
+                        }
+                    },
+                    {
+                        label: '宸ヨ壓鐗堟',
+                        prop: 'variables.craftEdition',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.craftEdition || '');
+                        }
+                    },
+                    {
+                        label: '宸ュ簭鍙�',
+                        prop: 'processNo',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.processNo || '');
+                        }
+                    },
+                    {
+                        label: '宸ュ簭鍚嶇О',
+                        prop: 'processName',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.processName || '');
+                        }
+                    },
+                    {
+                        label: '宸ュ簭鐗堟',
+                        prop: 'processEdition',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.processEdition || '');
+                        }
+                    },
+                    {
+                        label: '闆剁粍浠跺彿',
+                        prop: 'drawingNo',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.drawingNo || '');
+                        }
+                    },
+                    {
+                        label: '浠诲姟杞﹂棿',
+                        prop: 'workshop',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.workshop || '');
+                        }
+                    },
+                    {
+                        label: '杩囩▼鍗″彿',
+                        prop: 'empty',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.empty || '');
+                        }
+                    },
+                    {
+                        label: '鍥惧彿',
+                        prop: 'drawingNo',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.drawingNo)
+                        }
+                    },
+                    {
+                        label: '浜у搧鍨嬪彿',
+                        prop: 'productModel',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.productModel)
+                        }
+                    },                    
+                    {
+                        label: '鏈哄簥',
+                        prop: 'machineCode',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.machineCode)
+                        }
+                    },
+                    {
+                        label: '鍒涘缓浜�',
+                        prop: 'startUserName',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.startUserName)
+                        }
+                    },
+                    {
+                        label: '鍒涘缓鏃堕棿',
+                        prop: 'processCreateTime',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.processCreateTime)
+                        }
+                    },
+                    {
+                        label: '褰撳墠鑺傜偣',
+                        prop: 'taskName',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.taskName)
+                        }
+                    },
+                    {
+                        label: '璁″垝鍔犲伐鏃堕棿',
+                        prop: 'planStartTime',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.planStartTime || '');
+                        }
+                    },
+                    {
+                        label: '绋嬪簭鍖呭悕',
+                        prop: 'programPackageName',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.programPackageName || '');
+                        }
+                    },
+                    {
+                        label: '鍋忕鍗曞彿',
+                        prop: '',
+                        render: ({ row }) => {
+                            return h('p',{'class': 'margin0'}, row?.variables?.deviation || '');
+                        }
+                    },
+                ],
             },
             selectedList: [],
+            dialogVisible: false,
             reassignBox: false,
-                reassignForm: {},
-                reassignOption: {
-                    submitBtn: true,
-                    emptyBtn: false,
-                    column: [
-                        {
-                            label: '鍙戦�佺粰',
-                            prop: 'newAssigneeId',
-                            type: 'select',
-                            // dicUrl: `/blade-mdm/flow/flow-user-list?deptId=0`,
-                            // dicFlag: true,
-                            props: {
-                                label: 'name',
-                                value: 'id',
-                            },
-                            span: 24,
-                            disabled: false,
-                            dicData: [
+            reassignForm: {},
+            reassignOption: {
+                submitBtn: true,
+                emptyBtn: false,
+                column: [
+                    {
+                        label: '鍙戦�佺粰',
+                        prop: 'newAssigneeId',
+                        type: 'select',
+                        // dicUrl: `/blade-mdm/flow/flow-user-list?deptId=0`,
+                        // dicFlag: true,
+                        props: {
+                            label: 'name',
+                            value: 'id',
+                        },
+                        span: 24,
+                        disabled: false,
+                        dicData: [
 
-                            ],
-                            rules: [{ required: true, message: '璇疯緭鍏ラ�夋嫨', trigger: 'blur' }],
-                        },
-                        {
-                            label: '澶囨敞',
-                            span: 24,
-                            prop: 'comment',
-                            type: 'textarea',
-                            rules: [{ required: true, message: '璇疯緭鍏ュ鎵规剰瑙�', trigger: 'blur' }],
-                        },
-                    ],
-                },
+                        ],
+                        rules: [{ required: true, message: '璇疯緭鍏ラ�夋嫨', trigger: 'blur' }],
+                    },
+                    {
+                        label: '澶囨敞',
+                        span: 24,
+                        prop: 'comment',
+                        type: 'textarea',
+                        rules: [{ required: true, message: '璇疯緭鍏ュ鎵规剰瑙�', trigger: 'blur' }],
+                    },
+                ],
+            },
         }
     },
     mounted() {
@@ -183,6 +494,18 @@
         })
     },
     methods: {
+        customView(row) {
+            this.viewRow = {...row};
+            axios({
+                url: '/blade-mdm/flow/mgr/process-trace',
+                method: 'get',
+                params: {processInstanceId: row.processInstanceId}
+            }).then(
+              res => {
+                this.tableData = res.data.data;
+            });
+            this.dialogVisible = true;
+        },
         reassign() {// 閲嶆柊鎸囨淳
             console.log(this.selectedList.length)
             if (this.selectedList.length === 0) {
@@ -228,7 +551,9 @@
                     type: 'warning',
                 })
                     .then(() => {
-                        deleteRow({ processInstanceId: row.processInstanceId })
+                        deleteRow({ processInstanceId: row.processInstanceId,id:row.processInstanceId }).then(res => {
+                            this.onLoad(this.page, this.query);
+                        })
                     })
             } else if (flag === 1) {
                 printRow({ processInstanceId: row.processInstanceId })
@@ -378,4 +703,11 @@
 };
 </script>
 
-<style lang="scss" scoped></style>
\ No newline at end of file
+<style lang="scss">
+.margin0 {
+    margin: 0
+}
+.viewRowForm .el-form-item--default {
+    margin-bottom: 0
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3