From 6965f42ef65b3843d323f9da69fc4b5924b452f1 Mon Sep 17 00:00:00 2001
From: yangys <y_ys79@sina.com>
Date: 星期一, 08 九月 2025 11:17:10 +0800
Subject: [PATCH] 增加mes派工报表
---
src/api/statreport/taskdispatchreport.js | 18 ++++
src/views/statreport/taskdispatchreport.vue | 202 ++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 220 insertions(+), 0 deletions(-)
diff --git a/src/api/statreport/taskdispatchreport.js b/src/api/statreport/taskdispatchreport.js
new file mode 100644
index 0000000..a34da8d
--- /dev/null
+++ b/src/api/statreport/taskdispatchreport.js
@@ -0,0 +1,18 @@
+/*
+ * @Date: 2025-08-24 22:38:05
+ * @LastEditors: yangys
+ * @LastEditTime: 2025-08-24 08:32:12
+ * @FilePath: /mdmweb/src/api/flowmgr/exceptiontask.js
+ */
+import request from '@/axios';
+export const getList = (current, size, params) => {
+ return request({
+ url: '/blade-mdm/statreport/taskdispatch/page',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ },
+ })
+};
\ No newline at end of file
diff --git a/src/views/statreport/taskdispatchreport.vue b/src/views/statreport/taskdispatchreport.vue
new file mode 100644
index 0000000..b1f18f9
--- /dev/null
+++ b/src/views/statreport/taskdispatchreport.vue
@@ -0,0 +1,202 @@
+<!--
+ 鎶ヨ〃7锛宮es娲惧伐鎶ヨ〃
+ * @Date: 2025-06-18 09:17:09
+ * @LastEditors: yangys
+ * @LastEditTime: 2025-08-13 21:23:34
+ * @FilePath: /mdmweb/src/views/tasks/exceptiontask.vue
+-->
+<template>
+ <basic-container>
+ <avue-crud :option="option" :table-loading="loading" :data="data" v-model:page="page" v-model="form" ref="crud"
+ @search-change="searchChange" @search-reset="searchReset" @current-change="currentChange"
+ @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" @selection-change="selectionChange">
+
+ </avue-crud>
+ </basic-container>
+</template>
+
+<script>
+import { getList } from '@/api/statreport/taskdispatchreport.js';
+import { exportBlobPost } from '@/api/common';
+import { downloadFile } from '@/utils/util';
+import { getToken } from '@/utils/auth';
+import NProgress from 'nprogress';
+import 'nprogress/nprogress.css';
+export default {
+ name: 'MachineReturnFileOp',
+ data() {
+ return {
+ page: {
+ size: 10,
+ current: 1,
+ total: 0,
+ },
+ form: {},
+ query: {},
+ loading: true,
+ data: [],
+ option: {
+ addBtn: false,
+ editBtn: false,
+ delBtn: false,
+ columnBtn: false,
+ tip: false,
+ searchEnter: true,
+ searchShow: true,
+ searchMenuSpan: 6,
+ dialogWidth: '60%',
+ menu: false,
+ border: true,
+ index: true,
+ selection: false,
+ // viewBtn: true,
+ menuWidth: 140,
+ dialogClickModal: false,
+ column: [
+
+ {
+ label: '闆剁粍浠跺彿',
+ search: true,
+ prop: 'drawingNo'
+ },
+ {
+ label: '宸ュ簭鍙�',
+ width: 70,
+ prop: 'processNo'
+ },
+ {
+ label: '宸ュ簭鐗堟',
+ prop: 'processEdition'
+ },
+ {
+ label: '鍒涘缓鏃堕棿',
+ prop: 'createTime',
+ type: 'date',
+ showOverflowTooltip:true,
+ width: 155,
+ format: 'YYYY-MM-DD',
+ valueFormat: 'YYYY-MM-DD',
+ search: true,
+ searchRange: true,
+ searchSpan: 8,
+ hide: false,
+ },
+ {
+ label: '鏄惁鍥哄寲',
+ prop: 'cureTime',
+ width: 85,
+ render: ({ row }) => {
+ return row.cureTime?'宸插浐鍖�':'鏈浐鍖�';
+ },
+ },
+ {
+ label: '鍥哄寲鏃堕棿',
+ prop: 'cureTime'
+ }
+ ],
+ selection: [],
+ },
+
+ selection: [],
+ }
+ },
+ methods: {
+ selectionChange (list) {
+ this.selection = list;
+ },
+
+ handleExport(row,index) {
+ //瀹℃壒琛ㄤ笅杞�
+ this.$confirm('鏄惁瀵煎嚭瀹℃壒琛�?', '鎻愮ず', {
+ confirmButtonText: '纭畾',
+ cancelButtonText: '鍙栨秷',
+ type: 'warning',
+ }).then(() => {
+ NProgress.start();
+ exportBlobPost(
+ `/blade-mdm/statreport/tableprint/export-approve-table`,
+ { id:row.id,processInstanceId: row.processInstanceId }
+ ).then(res => {
+ let name = res.headers['content-disposition'].split('filename=')[1]
+ //console.log(res.headers['content-disposition'].split('filename=')[1]);
+ name = decodeURI(name)
+ console.log(name)
+ downloadFile(res.data, `${name}`);
+ NProgress.done();
+ });
+ });
+ },
+
+ searchChange(params, done) {
+ let data = {}
+ this.query = params;
+ this.page.currentPage = 1;
+ console.log('searchChange', params);
+ params.createTimeBegin = params?.createTime?.[0] || '';
+ params.createTimeEnd = params?.createTime?.[1] || '';
+
+ data = {
+ createTimeBegin: params.createTimeBegin,
+ createTimeEnd: params.createTimeEnd,
+ drawingNo: params.drawingNo,
+ }
+ this.query = data
+ this.onLoad(this.page, data);
+ done();
+ },
+ searchReset() {
+ let data = {}
+ this.query = params;
+ this.page.currentPage = 1;
+ data = {
+ createTimeBegin: params.confirmTimeBegin,
+ createTimeEnd: params.confirmTimeEnd,
+ keyword: params.keyword || ''
+ }
+ this.onLoad(this.page, data);
+ done();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ // this.onLoad();
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ /** * 椤甸潰鍔犺浇鏃惰幏鍙栨暟鎹�
+ */
+ onLoad(page, params = {}) {
+ console.log('onLoad', page, params);
+ const query = {
+ ...this.query,
+ // category: params.category ? flowCategory(params.category) : null,
+ //mode: this.mode,
+ };
+ try {
+ delete query.confirmTime; // 鍒犻櫎涓嶅繀瑕佺殑鏌ヨ鏉′欢
+ } catch (error) {
+ console.error('鏃ユ湡鏍煎紡鍖栭敊璇�', error);
+ }
+
+ this.loading = true;
+ getList(page.current, page.size, Object.assign(query, params)).then(res => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ }, () => {
+ this.data = [];
+ this.loading = false;
+ }).catch(err => {
+ this.data = [];
+ this.loading = false;
+ });
+ }
+ }
+};
+</script>
+
+<style lang="scss" scoped></style>
\ No newline at end of file
--
Gitblit v1.9.3