From 9adf9cd368006f07ecc43ef75b92972cb196b4ca Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期三, 09 四月 2025 13:10:39 +0800
Subject: [PATCH] 原辅材提交
---
src/views/standard/standardLibrary/audit.vue | 220 +++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 204 insertions(+), 16 deletions(-)
diff --git a/src/views/standard/standardLibrary/audit.vue b/src/views/standard/standardLibrary/audit.vue
index 831a4f5..ddd2e32 100644
--- a/src/views/standard/standardLibrary/audit.vue
+++ b/src/views/standard/standardLibrary/audit.vue
@@ -1,34 +1,222 @@
<template>
<div class="capacity-scope">
<div class="search">
- <div>
- <el-form :model="queryParams" ref="queryParams" size="small" :inline="true">
- <el-form-item label="妯℃澘鍚嶇О" prop="name">
- <el-input v-model="queryParams.name" clearable placeholder="璇疯緭鍏�" size="small"
- @keyup.enter.native="refreshTable()"></el-input>
- </el-form-item>
- <el-form-item>
- <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
- <el-button size="mini" @click="refresh">閲嶇疆</el-button>
- </el-form-item>
- </el-form>
- </div>
+ <el-form :model="queryParams" ref="queryParams" size="small" :inline="true">
+ <el-form-item label="鏇存柊浜�" prop="createUserName">
+ <el-input v-model="queryParams.createUserName" clearable placeholder="璇疯緭鍏�" size="small"
+ @keyup.enter.native="refreshTable()"></el-input>
+ </el-form-item>
+ <el-form-item>
+ <el-button type="primary" size="mini" @click="refreshTable">鏌ヨ</el-button>
+ <el-button size="mini" @click="refresh">閲嶇疆</el-button>
+ </el-form-item>
+ </el-form>
</div>
+ <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
+ :height="'calc(100vh - 250px)'" @pagination="pagination"></lims-table>
</div>
</template>
<script>
+import {
+ standardProductListRecordPage,
+ productListCheck,
+} from "@/api/standard/standardLibrary";
+import limsTable from "@/components/Table/lims-table.vue";
export default {
+ components: {
+ limsTable,
+ },
data() {
return {
- queryParams: {}
+ queryParams: {},
+ tableData: [],
+ column: [
+ { label: "鏇存柊鍘熷洜", prop: "remark" },
+ { label: "鏇存柊鏃堕棿", prop: "updateTime" },
+ { label: "鏇存柊浜�", prop: "createUserName" },
+ {
+ label: "鐘舵��", prop: "checkStatus",
+ dataType: "tag",
+ formatData: (params) => {
+ let obj = this.checkStatusList.find((m) => m.value == params)
+ if (obj) {
+ return obj.label
+ }
+ },
+ formatType: (params) => {
+ let obj = this.checkStatusList.find((m) => m.value == params)
+ if (obj) {
+ return obj.type
+ }
+ }
+ },
+ {
+ dataType: "action",
+ label: "鎿嶄綔",
+ operation: [
+ {
+ name: "涓婁紶",
+ type: "upload",
+ accept: '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.pdf',
+ url: '/updateRecord/uploadRecordFile',
+ uploadIdFun: (row) => {
+ return row.id
+ },
+ handleSuccessUp: () => {
+ this.getList()
+ },
+ disabled: (row) => {
+ return row.checkStatus > 1;
+ },
+ },
+ {
+ name: "瀹℃壒",
+ type: "text",
+ clickFun: (row) => {
+ this.handleCheck(row);
+ },
+ disabled: (row) => {
+ return row.checkStatus > 1;
+ },
+ },
+ {
+ name: "鏌ョ湅",
+ type: "text",
+ clickFun: (row) => {
+ this.$tab.closeRightPage();
+ this.$router.push({
+ path: "/audit/auditDetail", query: {
+ auditId: row.id
+ }
+ });
+ },
+ },
+ {
+ name: "涓嬭浇闄勪欢",
+ type: "text",
+ clickFun: (row) => {
+ this.handleDown(row);
+ },
+ },
+ ],
+ },
+ ],
+ page: {
+ total: 0,
+ size: 10,
+ current: 0,
+ },
+ tableLoading: false,
+ checkStatusList: [
+ {
+ value: 0,
+ label: '鏈彁浜�',
+ type: 'danger'
+ },
+ {
+ value: 1,
+ label: '寰呭鏍�',
+ type: 'warning'
+ },
+ {
+ value: 2,
+ label: '閫氳繃',
+ type: 'success'
+ },
+ {
+ value: 3,
+ label: '涓嶉�氳繃',
+ type: 'danger'
+ },
+ ],
}
},
+ mounted() {
+ this.getList()
+ },
methods: {
- refreshTable() { },
- refresh() { }
+ getList() {
+ this.tableLoading = true;
+ let param = { ...this.queryParams, ...this.page };
+ delete param.total;
+ standardProductListRecordPage({ ...param })
+ .then((res) => {
+ this.tableLoading = false;
+ if (res.code === 200) {
+ this.tableData = res.data.records;
+ this.page.total = res.data.total;
+ }
+ })
+ .catch((err) => {
+ this.tableLoading = false;
+ });
+ },
+ pagination({ page, limit }) {
+ this.page.current = page;
+ this.page.size = limit;
+ this.getList();
+ },
+ refreshTable(e) {
+ this.page.current = 1;
+ this.getList();
+ },
+ refresh() {
+ this.queryParams = {};
+ this.page.current = 1;
+ this.getList();
+ },
+ // 瀹℃牳
+ handleCheck(row) {
+ this.$confirm("鏄惁瀹℃牳閫氳繃?", "瀹℃牳", {
+ confirmButtonText: "閫氳繃",
+ cancelButtonText: "涓嶉�氳繃",
+ type: "warning",
+ closeOnClickModal: false, // 绂佹鐐瑰嚮閬僵灞傚叧闂�
+ distinguishCancelAndClose: true,
+ beforeClose: (action, instance, done) => {
+ if (action === 'confirm') {
+ // 閫氳繃
+ productListCheck({
+ checkStatus: 2,
+ id: row.id
+ }).then(res => {
+ if (res.code == 200) {
+ this.refresh()
+ done();
+ }
+ })
+ } else if (action === 'cancel') {
+ // 涓嶉�氳繃
+ productListCheck({
+ checkStatus: 3,
+ id: row.id
+ }).then(res => {
+ if (res.code == 200) {
+ this.refresh()
+ done();
+ }
+ })
+ } else if (action === 'close') {
+ // 鐐瑰嚮鈥溍椻�濇寜閽紝涓嶅厑璁稿叧闂�
+ done();
+ console.log("脳鎸夐挳鐐瑰嚮浜嬩欢锛屼笉鍏抽棴寮规");
+ }
+ }
+ })
+ },
+ // 涓嬭浇闄勪欢
+ handleDown(row) {
+ this.$download.saveAs(row.filePath, row.fileName);
+ },
}
}
</script>
-<style scoped></style>
\ No newline at end of file
+<style scoped>
+.search {
+ height: 46px;
+ display: flex;
+ justify-content: space-between;
+}
+</style>
\ No newline at end of file
--
Gitblit v1.9.3