From 21e7326b415597938fba463ebb8b3507b7fdbdfd Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期六, 15 三月 2025 13:57:57 +0800
Subject: [PATCH] 修改原材料下单报异常捕获方式
---
src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue | 85 +++++++++---------------------------------
1 files changed, 19 insertions(+), 66 deletions(-)
diff --git a/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue b/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue
index 23651f0..1485e6c 100644
--- a/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue
+++ b/src/views/CNAS/systemManagement/documentRecords/outDocumenRecordt.vue
@@ -1,7 +1,7 @@
<template>
<!-- 澶栨潵鏂囦欢纭璁板綍 -->
- <div class="ExternalDocumentConfirmationRecords">
- <el-tabs type="border-card" v-model="activeName" style="height: 100%;">
+ <div class="capacity-scope">
+ <el-tabs type="border-card" v-model="activeName" style="height: 100%;" @change="getTableData">
<el-tab-pane label="濉啓" name="濉啓" style="height: 100%;">
<div style="display: flex;align-items: center;justify-content: flex-end;margin-right: 20px;">
<el-button size="small" type="primary" @click="openAdd('鏂板')" style="margin-left: 20px;">鏂板</el-button>
@@ -10,13 +10,8 @@
:on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
<el-button size="small" type="primary" :loading="upLoading">瀵煎叆</el-button></el-upload>
</div>
- <div class="table" style="height: calc(100% - 200px)">
- <!-- <ValueTable ref="ValueTable0" :url="$api.manageRecordTotal.pageManageRecordVerify"
- :componentData="componentData0" :key="upIndex0" :delUrl="$api.manageRecordTotal.delManageRecordVerify"
- :upUrl="$api.manageRecordTotal.doManageRecordVerify" /> -->
- <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading0"
- :height="'calc(100vh - 270px)'" @pagination="pagination0"></lims-table>
- </div>
+ <lims-table :tableData="tableData0" :column="column0" :page="page0" :tableLoading="tableLoading0"
+ :height="'calc(100vh - 290px)'" @pagination="pagination0"></lims-table>
</el-tab-pane>
<el-tab-pane label="鍘嗗彶璁板綍" name="鍘嗗彶璁板綍" style="height: 100%;">
<div class="search">
@@ -33,12 +28,8 @@
<el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
</div>
</div>
- <div class="table">
- <!-- <ValueTable ref="ValueTable" :url="$api.manageRecordTotal.pageManageRecordTotal"
- :componentData="componentData" :key="upIndex" /> -->
- <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
- :height="'calc(100vh - 280px)'" @pagination="pagination"></lims-table>
- </div>
+ <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
+ :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table>
</el-tab-pane>
</el-tabs>
<!-- 璇︽儏/涓嬭浇/瀹℃牳 -->
@@ -95,7 +86,6 @@
<script>
import limsTable from "@/components/Table/lims-table.vue";
import filePreview from '@/components/Preview/filePreview.vue'
-import ValueTable from '@/components/Table/value-table.vue'
import {
addManageRecordVerify,
pageManageRecordVerify,
@@ -106,8 +96,8 @@
doManageRecordVerify
} from '@/api/cnas/systemManagement/documentRecords.js'
export default {
+ name: 'OutDocumenRecordt',
components: {
- ValueTable,
filePreview,
limsTable,
},
@@ -173,8 +163,8 @@
{
name: "鎵瑰噯",
type: "text",
- clickFun: (handleApproval) => {
- this.handleSubmit(row);
+ clickFun: (row) => {
+ this.handleApproval(row);
},
disabled: (row) => {
return !row.submitUserName || !!row.ratifyUserName
@@ -248,49 +238,15 @@
}
},
mounted() {
- // this.entityCopy = this.HaveJson(this.componentData.entity);
- this.getList()
- this.getList0()
+ this.getTableData();
},
methods: {
- getPower() {
- let power = JSON.parse(sessionStorage.getItem('power'))
- let add = false
- let del = false
- let up = false;
- let sub = false
- let ratify = false
- for (var i = 0; i < power.length; i++) {
- if (power[i].menuMethod == 'addManageRecordVerify') {
- add = true
- }
- if (power[i].menuMethod == 'delManageRecordVerify') {
- del = true
- }
- if (power[i].menuMethod == 'exportManageRecordVerify') {
- up = true
- }
- if (power[i].menuMethod == 'submitManageRecordTotal') {
- sub = true
- }
- if (power[i].menuMethod == 'ratifyManageRecordTotal') {
- ratify = true
- }
+ getTableData() {
+ if (this.activeName === '濉啓') {
+ this.getList0()
+ } else {
+ this.getList()
}
- if (!ratify) {
- this.componentData.do.splice(3, 1)
- }
- if (!sub) {
- this.componentData.do.splice(2, 1)
- }
- if (!del) {
- this.componentData0.do.splice(1, 1)
- }
- if (!add) {
- this.componentData0.do.splice(0, 1)
- }
- this.addPower = add
- this.upPower = up
},
openAdd(title, row) {
this.title = title;
@@ -339,7 +295,7 @@
});
},
pagination0({ page, limit }) {
- this.pag0.current = page;
+ this.page0.current = page;
this.page0.size = limit;
this.getList0();
},
@@ -397,8 +353,7 @@
}).catch(err => { });
},
handleDown0(row) {
- let url = this.javaApi + '/word/' + row.url
- this.$download.saveAs(url, '澶栨潵鏂囦欢纭璁板綍')
+ this.$download.saveAs(row.url, '澶栨潵鏂囦欢纭璁板綍')
},
// 鎻愪氦
handleSubmit(row) {
@@ -414,7 +369,7 @@
type: 'success',
message: '鎻愪氦鎴愬姛!'
});
- this.refreshTable()()
+ this.refreshTable()
}).catch(err => { });
})
},
@@ -436,12 +391,11 @@
}).then(res => {
this.checkLoading = false
this.noCheckLoading = false
- if (res.code === 201) return
this.$message({
type: 'success',
message: '鎿嶄綔鎴愬姛!'
});
- this.refreshTable()()
+ this.refreshTable()
this.lookDialogVisible = false
}).catch(err => { });
},
@@ -453,7 +407,6 @@
})
.then(() => {
delManageRecordVerify({ id: row.id }).then((res) => {
- if (res.code == 201) return;
this.$message.success("鍒犻櫎鎴愬姛");
this.getList0()
});
--
Gitblit v1.9.3