From 2bd54f454ea035ebc10e4d5bf4e50169c3929c5c Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期四, 15 五月 2025 17:49:58 +0800
Subject: [PATCH] 二保、三保流程审批、数据回显修改
---
src/views/eam/DailyInspectionStandardList.vue | 215 +++++++++++++++++++++++++++++++++++++++++++++++++++--
1 files changed, 207 insertions(+), 8 deletions(-)
diff --git a/src/views/eam/DailyInspectionStandardList.vue b/src/views/eam/DailyInspectionStandardList.vue
index 2ba59ba..8473bf0 100644
--- a/src/views/eam/DailyInspectionStandardList.vue
+++ b/src/views/eam/DailyInspectionStandardList.vue
@@ -1,6 +1,6 @@
<template>
<a-card
- title="鑷富缁存姢鐐规鏍囧噯"
+ title=""
:bordered='false'
>
<div class='table-page-search-wrapper'>
@@ -83,6 +83,17 @@
</a-upload>
<a-button
type="primary"
+ @click="handleDownload"
+ icon="download"
+ >妯$増涓嬭浇</a-button>
+ <a-button
+ v-show="selectedRowKeys.length == 1 "
+ type="primary"
+ @click="handlePrint(selectionRows[0])"
+ icon="highlight"
+ >妯$増鎵撳嵃</a-button>
+ <a-button
+ type="primary"
@click="searchQuery"
icon="search"
>鏌ヨ</a-button>
@@ -92,6 +103,22 @@
icon="reload"
style="margin-left: 8px"
>閲嶇疆</a-button>
+ <a-button
+ v-show="this.selectedRowKeys.length > 0 && this.queryParam.versionStatus == '1'"
+ type="primary"
+ @click="batchHandleOK"
+ icon="reload"
+ style="margin-left: 8px"
+ v-has="'dailyInspectionStandard:batchHandleOK'"
+ >鎵归噺閫氳繃</a-button>
+ <a-button
+ v-show="this.selectedRowKeys.length > 0 && this.queryParam.versionStatus == '1'"
+ type="primary"
+ @click="batchHandleReject"
+ icon="reload"
+ style="margin-left: 8px"
+ v-has="'dailyInspectionStandard:batchHandleReject'"
+ >鎵归噺椹冲洖</a-button>
</div>
<!-- table鍖哄煙-begin -->
@@ -121,6 +148,24 @@
:customRow='clickThenSelect'
@change='handleTableChange'
>
+ <span
+ slot="disUda1"
+ slot-scope="text"
+ >
+ <j-ellipsis
+ :value="text"
+ :length="10"
+ />
+ </span>
+ <span
+ slot="teamName"
+ slot-scope="text"
+ >
+ <j-ellipsis
+ :value="text"
+ :length="10"
+ />
+ </span>
<!-- <span
slot='action'
@@ -228,16 +273,18 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
-import { getAction, requestPut } from '@/api/manage'
+import { getAction, requestPut, downFile } from '@/api/manage'
import DailyInspectionStandardDetail from './modules/dailyInspectionStandard/DailyInspectionStandardDetail'
import DailylnspectionStandardModal from './modules/dailyInspectionStandard/DailylnspectionStandardModal'
import AuditApprovalModal from './modules/dailyInspectionStandard/AuditApprovalModal'
import '@/assets/less/TableExpand.less'
+import JEllipsis from "@/components/jeecg/JEllipsis";
export default {
name: 'DailyInspectionStandardList',
mixins: [JeecgListMixin],
components: {
+ JEllipsis,
DailyInspectionStandardDetail,
DailylnspectionStandardModal,
AuditApprovalModal
@@ -260,6 +307,12 @@
title: '鏍囧噯缂栫爜',
align: 'center',
dataIndex: 'num',
+ },
+ {
+ title: '绠$悊鍒跺害',
+ align: 'center',
+ dataIndex: 'disUda1',
+ scopedSlots: { customRender: 'disUda1' },
},
{
title: '绛惧鐘舵��',
@@ -291,16 +344,27 @@
title: '璐d换鐝粍',
align: 'center',
dataIndex: 'teamName',
+ scopedSlots: { customRender: 'teamName' },
},
+ // {
+ // title: '娲惧伐鏂瑰紡',
+ // align: 'center',
+ // dataIndex: 'assignModeName',
+ // },
{
- title: '娲惧伐鏂瑰紡',
+ title: '瀹℃牳缁撴灉',
align: 'center',
- dataIndex: 'assignModeName',
+ dataIndex: 'disUda2',
},
{
title: '瀹℃牳鎰忚',
align: 'center',
dataIndex: 'auditFeedback',
+ },
+ {
+ title: '瀹℃壒缁撴灉',
+ align: 'center',
+ dataIndex: 'disUda3',
},
{
title: '瀹℃壒鎰忚',
@@ -377,7 +441,7 @@
align: 'center',
fixed: 'right',
scopedSlots: { customRender: 'action' },
- width: 200,
+ width: 230,
}
],
url: {
@@ -386,14 +450,17 @@
deleteBatch: '/eam/inspectionStandard/deleteBatch',
versionTakeEffect: "/eam/inspectionStandard/versionTakeEffect",
importExcelUrl: "/eam/inspectionStandard/importExcel",
+ passBatch: '/eam/inspectionStandard/auditApprovalBatch',
+ download: '/sys/upload/downloadFile',
+ uploadList: '/sys/upload/list',
},
version: '1.0',
dictOptions: {},
/* 鍒嗛〉鍙傛暟 */
ipagination: {
current: 1,
- pageSize: 5,
- pageSizeOptions: ['5', '10', '50'],
+ pageSize: 20,
+ pageSizeOptions: ['5', '10', '20', '50'],
showTotal: (total, range) => {
return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�'
},
@@ -514,7 +581,7 @@
},
searchReset() {
this.inspectionStandardId = '-1'
- this.queryParam = {}
+ this.queryParam = { versionStatus: '2' }
this.loadData(1);
},
modalFormOk() {
@@ -523,6 +590,138 @@
//娓呯┖鍒楄〃閫変腑
// this.onClearSelected()
},
+ batchHandleReject: function () {
+ if (this.selectedRowKeys.length <= 0) {
+ // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒');
+ this.$notification.warning({
+ message: '娑堟伅',
+ description: "璇烽�夋嫨涓�鏉¤褰�"
+ });
+ return;
+ } else {
+
+ var that = this;
+ this.$confirm({
+ title: "纭鎵归噺椹冲洖",
+ content: "鏄惁鎵归噺椹冲洖閫変腑鏁版嵁?",
+ onOk: function () {
+ that.loading = true;
+ that.confirmLoading = true;
+ let formData = {};
+ let dailyInspectionStandardlist = that.selectionRows
+ for (var i = 0; i < dailyInspectionStandardlist.length; i++) {
+ let record = dailyInspectionStandardlist[i]
+ if (record.approvalStatus == '1') {
+ record.approvalStatus = '2'
+ } else if (record.approvalStatus == '3') {
+ record.approvalStatus = '4'
+ } else if (record.approvalStatus == '4') {
+ record.approvalStatus = '2'
+ }
+ }
+ formData.dailyInspectionStandardlist = dailyInspectionStandardlist
+ requestPut(that.url.passBatch, formData).then((res) => {
+ if (res.success) {
+ that.$message.success("鎵归噺椹冲洖鎴愬姛锛�")
+ that.loadData(1)
+ } else {
+ that.$message.warning("鎵归噺閫氳繃澶辫触锛�")
+ }
+ }).finally(() => {
+ that.confirmLoading = false;
+ that.loading = false;
+ })
+ }
+ });
+ }
+ },
+
+ batchHandleOK: function () {
+ if (this.selectedRowKeys.length <= 0) {
+ // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒');
+ this.$notification.warning({
+ message: '娑堟伅',
+ description: "璇烽�夋嫨涓�鏉¤褰�"
+ });
+ return;
+ } else {
+
+ var that = this;
+ this.$confirm({
+ title: "纭鎵归噺閫氳繃",
+ content: "鏄惁鎵归噺閫氳繃閫変腑鏁版嵁?",
+ onOk: function () {
+ that.loading = true;
+ that.confirmLoading = true;
+ let formData = {};
+ let dailyInspectionStandardlist = that.selectionRows
+ for (var i = 0; i < dailyInspectionStandardlist.length; i++) {
+ let record = dailyInspectionStandardlist[i]
+ if (record.approvalStatus == '1') {
+ record.approvalStatus = '3'
+ } else if (record.approvalStatus == '2') {
+ record.approvalStatus = '3'
+ } else if (record.approvalStatus == '3') {
+ record.approvalStatus = '5'
+ } else if (record.approvalStatus == '4') {
+ record.approvalStatus = '3'
+ }
+ }
+ formData.dailyInspectionStandardlist = dailyInspectionStandardlist
+ requestPut(that.url.passBatch, formData).then((res) => {
+ if (res.success) {
+ that.$message.success("鎵归噺閫氳繃鎴愬姛锛�")
+ that.loadData(1)
+ } else {
+ that.$message.warning("鎵归噺閫氳繃澶辫触锛�")
+ }
+ }).finally(() => {
+ that.confirmLoading = false;
+ that.loading = false;
+ })
+ }
+ });
+ }
+ },
+
+ handleDownload() {
+ var params = {}//鏌ヨ鏉′欢
+ params.type = "inspection"
+ params.pageNo = 1
+ params.pageSize = 10
+ getAction(this.url.uploadList, params).then((res2) => {
+ if (res2.success) {
+ if (res2.result.records.length > 0) {
+ downFile(this.url.download, { id: res2.result.records[0].id }).then((res) => {
+ if (!res) {
+ this.$message.warning('鏂囦欢涓嬭浇澶辫触')
+ return
+ } else {
+ let fileName = res2.result.records[0].name
+ if (typeof window.navigator.msSaveBlob !== 'undefined') {
+ window.navigator.msSaveBlob(new Blob([res]), fileName)
+ } else {
+ let url = window.URL.createObjectURL(new Blob([res]))
+ let link = document.createElement('a')
+ link.style.display = 'none'
+ link.href = url
+ link.setAttribute('download', fileName)
+ document.body.appendChild(link)
+ link.click()
+ document.body.removeChild(link) //涓嬭浇瀹屾垚绉婚櫎鍏冪礌
+ window.URL.revokeObjectURL(url) //閲婃斁鎺塨lob瀵硅薄
+ }
+ }
+ })
+ }
+ }
+ })
+ },
+
+ handlePrint(record) {
+ let href = `${window._CONFIG['domianURL']}/jmreport/view/934677113625829376?id=` + record.id; //缃戠珯閾炬帴
+ window.open(href, "_blank");
+ },
}
}
--
Gitblit v1.9.3