From 13a60da2424da8cd50e52e35e0126e23e34ea6f3 Mon Sep 17 00:00:00 2001 From: zhuo <2089219845@qq.com> Date: 星期日, 16 三月 2025 15:58:25 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- src/views/business/productOrder/index.vue | 60 ++++++++++++++++++++++++++++++++++++++---------------------- 1 files changed, 38 insertions(+), 22 deletions(-) diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue index 81a2848..18745a7 100644 --- a/src/views/business/productOrder/index.vue +++ b/src/views/business/productOrder/index.vue @@ -15,11 +15,6 @@ <el-input v-model="entity.sampleModel" clearable placeholder="璇疯緭鍏�" size="small" @keyup.enter.native="refreshTable()"></el-input> </el-form-item> -<!-- <el-form-item label="鏍峰搧缂栧彿" prop="sampleCode" v-if="more">--> -<!-- <el-input v-model="entity.sampleCode" clearable placeholder="璇疯緭鍏�" size="small"--> -<!-- @keyup.enter.native="refreshTable">--> -<!-- </el-input>--> -<!-- </el-form-item>--> <el-form-item label="涓嬪崟鏃堕棿" prop="createTime" v-if="more"> <el-date-picker v-model="entity.createTime" clearable format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" style="width:100%" type="date" value-format="yyyy-MM-dd HH:mm:ss"> @@ -307,7 +302,6 @@ <script> import vueQr from 'vue-qr' import PrintJS from 'print-js' -import file from "@/utils/file"; import PrintDialog from "@/views/business/productOrder/components/printDialog.vue"; import AddInspectionDia from "@/views/business/productOrder/components/addInspectionDia.vue"; import limsTable from "@/components/Table/lims-table.vue"; @@ -321,8 +315,8 @@ import { selectUserCondition } from "@/api/performance/class"; import { downFile, getFileList, selectSampleAndProductByOrderId } from "@/api/business/rawMaterialOrder"; import {mapGetters} from "vuex"; -// import Inspection from "../do/b1-inspect-order-plan/Inspection.vue"; export default { + name: 'ProductOrder', components: { limsTable, AddInspectionDia, @@ -339,9 +333,21 @@ tableData: [], tableLoading: false, column: [ - { label: '濮旀墭缂栧彿', prop: 'entrustCode', width: '160px' }, + { + label: "濮旀墭缂栧彿", + prop: "entrustCode", + width: "160px", + dataType: "link", + linkMethod: "changeEntrustCode", + }, { label: '濮旀墭鍗曚綅', prop: 'company' }, - { label: '鏍峰搧鍚嶇О', prop: 'sampleName' }, + { + label: "鏍峰搧鍚嶇О", + prop: "sampleName", + width: "160px", + dataType: "link", + linkMethod: "selectAllByOne", + }, { label: '鏍峰搧鍨嬪彿', prop: 'sampleModel' }, { label: '鏍峰搧鏁伴噺', prop: 'sampleNum' }, { label: '妫�楠屼汉', prop: 'testingName' }, @@ -749,6 +755,9 @@ this.refreshTable() this.getAuthorizedPerson() }, + activated() { + this.refreshTable() + }, methods: { // 鏌ヨ鍒楄〃鏁版嵁 refreshTable() { @@ -763,7 +772,7 @@ } const params = { ...this.entity, state: this.tabList[this.tabIndex].value } this.tableLoading = true - selectInsOrderParameter(params).then(res => { + selectInsOrderParameter({...this.page,...params}).then(res => { this.upIndex++ this.tableLoading = false if (res.code === 200) { @@ -784,6 +793,9 @@ }, // 鎵撳紑淇敼濮旀墭缂栧彿寮规 changeEntrustCode(row) { + if (this.tabIndex !== 1) { + return + } this.entrustCodeVisible = true this.entrustCodeInfo = { ...row } }, @@ -877,7 +889,8 @@ }, // 瀵煎嚭璁板綍 downLoad() { - rawAllInsOrderExport({ ...this.entity }).then(res => { + const params = { ...this.entity, state: this.tabList[this.tabIndex].value } + rawAllInsOrderExport({ ...params }).then(res => { const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '濮旀墭妫�娴嬩俊鎭鍑�.xlsx'); }).catch(err => { @@ -929,15 +942,13 @@ }, // 璇︽儏 selectAllByOne(row) { - this.active = 2; - // console.log(row); - // //鎵撳紑寮规 - // this.dialogVisible = true; - // //row = 鐐瑰嚮瀵瑰簲琛屽�� - // //澶嶅埗缁檉ormData - // this.formData = this.HaveJson(row); - this.currentId = row.id - this.examine = 1 + this.$router.push({ + path: "/productOrder/add", query: { + examine: 1, + active: 2, + currentId: row.id + } + }); }, // 鏁版嵁鏌ョ湅 handleDataLook(row) { @@ -1004,8 +1015,13 @@ // 涓嬭浇鎶ュ憡 download(row) { let url = row.urlS ? row.urlS : row.url; - if (url) { - this.$download.saveAs(url, row.entrustCode); + if(url){ + url = url.split('.')[0]+'.pdf' + const link = document.createElement('a'); + link.href = this.javaApi + url; + link.target = '_blank'; + document.body.appendChild(link); + link.click(); } }, // 鎾ら攢 -- Gitblit v1.9.3