From d2e867966539004b6b5a73ae3566a659ac6f8b6d Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期四, 30 十月 2025 11:55:34 +0800
Subject: [PATCH] 检验任务数据分类查询问题修复
---
src/views/business/unpass/components/unPassDialog.vue | 32 ++++++++++----------------------
1 files changed, 10 insertions(+), 22 deletions(-)
diff --git a/src/views/business/unpass/components/unPassDialog.vue b/src/views/business/unpass/components/unPassDialog.vue
index 39a57b1..caaa8e2 100644
--- a/src/views/business/unpass/components/unPassDialog.vue
+++ b/src/views/business/unpass/components/unPassDialog.vue
@@ -62,7 +62,7 @@
</el-form-item>
</el-form>
<el-upload v-if="type === 'add'" ref="upload" :action="action2" :on-change="beforeUpload" :on-error="onError"
- :on-remove="handleRemoveFile" :on-success="getUnpassUrl" :headers="headers" :file-list="unPassFilesList">
+ :on-remove="handleRemoveFile" :on-success="getUnpassUrl" :headers="uploadHeader" :file-list="unPassFilesList">
<el-button size="small" type="primary" style="text-align: left">闄勪欢涓婁紶</el-button>
</el-upload>
<div v-if="type !== 'add'">
@@ -84,6 +84,7 @@
<script>
import { getInsOrder, getUnqualifiedHandler, downFile, addUnqualifiedHandler } from '@/api/business/unpass.js'
+import {mapGetters} from "vuex";
export default {
name: "unPassDialog",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
@@ -148,17 +149,17 @@
orderId: this.orderId
}).then(res => {
if (res.code === 200) {
- this.unPassForm.headline = `No.0005-涓ぉ瑁呭鐢电嚎-澶栬喘鍝佷笉鍚堟牸鍙嶉璇勫鍙婄籂姝i闃叉祦绋�(姝e紡鐗�)-${JSON.parse(localStorage.getItem("user")).name}-${new Date().toISOString().substring(0, 10)}` // 鏍囬
- this.unPassForm.inventoryQuantityId = res.data.insOrderTemplate.inventoryQuantityId // 鍘熸潗鏂檌d
+ this.unPassForm.headline = `No.0005-涓ぉ鑰愪笣-澶栬喘鍝佷笉鍚堟牸鍙嶉璇勫鍙婄籂姝i闃叉祦绋�(姝e紡鐗�)-${this.nickName}-${new Date().toISOString().substring(0, 10)}` // 鏍囬
+ this.unPassForm.feedbackTime = new Date().toISOString().substring(0, 10) // 鎶ユ鏃堕棿
+ this.unPassForm.feedbackUser = this.nickName // 鍙嶉浜�
this.unPassForm.insOrderId = res.data.insOrder.id // 璁㈠崟id
- this.unPassForm.supplierName = res.data.insOrderTemplate.supplierName // 渚涘簲鍟嗗悕绉�
this.unPassForm.materialName = res.data.insOrder.sampleType // 鐗╂枡鍚嶇О
+ this.unPassForm.specsModels = res.data.insOrder.partDetail // 瑙勬牸鍨嬪彿
+ this.unPassForm.inventoryQuantityId = res.data.insOrderTemplate.inventoryQuantityId // 鍘熸潗鏂檌d
+ this.unPassForm.supplierName = res.data.insOrderTemplate.supplierName // 渚涘簲鍟嗗悕绉�
this.unPassForm.productionBatch = res.data.insOrderTemplate.updateBatchNo // 鐢熶骇鎵规
this.unPassForm.cargoQuantity = res.data.insOrderTemplate.qtyArrived + res.data.insOrderTemplate.buyUnitMeas // 鍒拌揣鏁伴噺
- this.unPassForm.specsModels = res.data.insOrder.partDetail // 瑙勬牸鍨嬪彿
this.unPassForm.inspectTime = res.data.insOrderTemplate.sendTime.substring(0, 10) // 鎶ユ鏃堕棿
- this.unPassForm.feedbackTime = new Date().toISOString().substring(0, 10) // 鎶ユ鏃堕棿
- this.unPassForm.feedbackUser = JSON.parse(localStorage.getItem("user")).name // 鍙嶉浜�
}
})
} else {
@@ -179,16 +180,7 @@
downFile({
id: row.id,
}).then(res => {
- if (res.code === 200) {
- let url = '';
- if (res.data.type == 1) {
- url = this.javaApi + '/img/' + res.data.fileUrl
- this.$download.saveAs(url, row.fileName);
- } else {
- url = this.javaApi + '/word/' + res.data.fileUrl
- this.$download.saveAs(url, row.fileName);
- }
- }
+ this.$download.saveAs(res.data.fileUrl, row.fileName);
}).catch(error => {
})
@@ -256,11 +248,7 @@
},
},
computed: {
- headers() {
- return {
- 'token': sessionStorage.getItem('token')
- }
- },
+ ...mapGetters(["nickName"]),
action2() {
return this.javaApi + '/unqualifiedHandler/uploadFileByUnqualified'
}
--
Gitblit v1.9.3