From e4c5b0f332afbc2b4fe8abf07f348e8a1d278562 Mon Sep 17 00:00:00 2001 From: spring <2396852758@qq.com> Date: 星期四, 10 四月 2025 10:34:32 +0800 Subject: [PATCH] 原辅材和成品下单调整,前端加起始时间、终止时间、试验条件等原始记录模板信息 --- src/views/standard/standardLibrary/audit.vue | 107 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 files changed, 88 insertions(+), 19 deletions(-) diff --git a/src/views/standard/standardLibrary/audit.vue b/src/views/standard/standardLibrary/audit.vue index 8e8ba20..ddd2e32 100644 --- a/src/views/standard/standardLibrary/audit.vue +++ b/src/views/standard/standardLibrary/audit.vue @@ -2,8 +2,8 @@ <div class="capacity-scope"> <div class="search"> <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" + <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> @@ -18,6 +18,10 @@ </template> <script> +import { + standardProductListRecordPage, + productListCheck, +} from "@/api/standard/standardLibrary"; import limsTable from "@/components/Table/lims-table.vue"; export default { components: { @@ -28,22 +32,43 @@ queryParams: {}, tableData: [], column: [ - { label: "鏇存柊鍘熷洜", prop: "number" }, - { label: "鏇存柊鏃堕棿", prop: "name" }, - { label: "鏇存柊浜�", prop: "remark" }, - { label: "鐘舵��", prop: "remark" }, + { 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: "涓婁紶闄勪欢", + name: "涓婁紶", type: "upload", accept: '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.pdf', - url: '/insReport/inReport', + url: '/updateRecord/uploadRecordFile', uploadIdFun: (row) => { return row.id - } + }, + handleSuccessUp: () => { + this.getList() + }, + disabled: (row) => { + return row.checkStatus > 1; + }, }, { name: "瀹℃壒", @@ -51,15 +76,20 @@ clickFun: (row) => { this.handleCheck(row); }, - // showHide: (row) => { - // return this.checkPermi(["standard:model:del"]); - // }, + disabled: (row) => { + return row.checkStatus > 1; + }, }, { name: "鏌ョ湅", type: "text", clickFun: (row) => { - this.handleLook(row); + this.$tab.closeRightPage(); + this.$router.push({ + path: "/audit/auditDetail", query: { + auditId: row.id + } + }); }, }, { @@ -78,14 +108,39 @@ 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: { getList() { this.tableLoading = true; let param = { ...this.queryParams, ...this.page }; delete param.total; - selectStandardTemplatePageList({ ...param }) + standardProductListRecordPage({ ...param }) .then((res) => { this.tableLoading = false; if (res.code === 200) { @@ -122,10 +177,26 @@ beforeClose: (action, instance, done) => { if (action === 'confirm') { // 閫氳繃 - this.refresh(); + productListCheck({ + checkStatus: 2, + id: row.id + }).then(res => { + if (res.code == 200) { + this.refresh() + done(); + } + }) } else if (action === 'cancel') { // 涓嶉�氳繃 - this.refresh(); + productListCheck({ + checkStatus: 3, + id: row.id + }).then(res => { + if (res.code == 200) { + this.refresh() + done(); + } + }) } else if (action === 'close') { // 鐐瑰嚮鈥溍椻�濇寜閽紝涓嶅厑璁稿叧闂� done(); @@ -134,11 +205,9 @@ } }) }, - // 鏌ョ湅 - handleLook(row) { }, // 涓嬭浇闄勪欢 handleDown(row) { - this.$download.saveAs(row.fileUrl, row.fileName); + this.$download.saveAs(row.filePath, row.fileName); }, } } -- Gitblit v1.9.3