From 1ece9a67f303b73a67ebe78b681143006fc89894 Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期五, 12 四月 2024 16:07:49 +0800
Subject: [PATCH] 产品检、过程检新增附件

---
 src/views/quality/finishedProductInspection/finishedProduct-form.vue |   69 +++++++++++++++++++++++
 src/views/quality/processInspect/processInspect-form.vue             |   69 +++++++++++++++++++++++
 2 files changed, 138 insertions(+), 0 deletions(-)

diff --git a/src/views/quality/finishedProductInspection/finishedProduct-form.vue b/src/views/quality/finishedProductInspection/finishedProduct-form.vue
index 162fe06..c504af6 100644
--- a/src/views/quality/finishedProductInspection/finishedProduct-form.vue
+++ b/src/views/quality/finishedProductInspection/finishedProduct-form.vue
@@ -285,6 +285,54 @@
                         </el-table-column>
                         </el-table>
                 </el-tab-pane>
+                <el-tab-pane label="闄勪欢">
+                    <el-table :data="configFileTableData" height="400px">
+                        <el-table-column
+                        prop="orderNumber"
+                        align="center"
+                        label="璁㈠崟鍙�"
+                        show-overflow-tooltip
+                        >
+                        </el-table-column>
+                        <el-table-column
+                        prop="originalFileName"
+                        align="center"
+                        label="鍘熸枃浠跺悕"
+                        width="200"
+                        >
+                        </el-table-column>
+                        <el-table-column prop="fileName" align="center" label="鏂囦欢鍚庣紑">
+                        </el-table-column>
+                        <el-table-column prop="createUser" align="center" label="涓婁紶浜�">
+                        </el-table-column>
+                        <el-table-column
+                        prop="createTime"
+                        align="center"
+                        label="涓婁紶鏃堕棿"
+                        show-overflow-tooltip
+                        >
+                        </el-table-column>
+                        <el-table-column prop="updateUser" align="center" label="鏇存柊浜�">
+                        </el-table-column>
+                        <el-table-column
+                        prop="updateTime"
+                        align="center"
+                        label="鏇存柊鏃堕棿"
+                        show-overflow-tooltip
+                        >
+                        </el-table-column>
+                        <el-table-column fixed="right" align="center" label="鎿嶄綔">
+                        <template slot-scope="scope">
+                            <el-button
+                            @click="downloadProcessConfigFiles(scope.row)"
+                            type="text"
+                            size="small"
+                            >涓嬭浇</el-button
+                            >
+                        </template>
+                        </el-table-column>
+                    </el-table>
+                </el-tab-pane>
             </el-tabs>
 
         </div>
@@ -351,12 +399,15 @@
  import { getIfsLocationByGroupCopyAll } from '@/api/warehouse/location'
  import qrCodeApp from '@/views/common/qrCodeApp'
  import { getStore } from '@/util/store'
+ import { getProcessConfigFile } from '@/api/plan/manufacturingorder'
+ import * as customerorder from '@/api/plan/customerorder'
 export default {
     components:{
         qrCodeApp
     },
     data() {
         return {
+            dataForm:null,
             progrecessFileLoading: false,
             processConfigFileTableData: [],
             headers: {
@@ -408,6 +459,7 @@
             },
             inspectionItems: [], // 鏂板妫�楠岄」鐩〃鏍�
             inspectionResultForm: [],
+            configFileTableData:[]
         }
     },
     watch: {
@@ -431,6 +483,21 @@
         this.init()
     },
     methods: {
+        getProcessConfigFile(){
+            getProcessConfigFile({
+            orderNumber: this.dataForm.orderNumber,
+            lineNumber: this.dataForm.customerNo
+            }).then((res)=>{
+                this.configFileTableData = res.data.data
+            })
+        },
+        downloadProcessConfigFiles(row){
+            customerorder.downloadProcessConfigFile(
+                row.fileName,
+                row.bucketName,
+                row.originalFileName
+            )
+        },
       saveTable(){
         let finishedInsProducts = [];
         if(this.inspectionItems.length>0){
@@ -601,6 +668,7 @@
             if(id != null){
                 queryById(id).then(res=>{
                     let result = res.data.data
+                    this.dataForm = result
                     this.processInspectVo.finInsNo = result.finInsNo
                     this.processInspectVo.orderNumber = result.orderNumber
                     this.processInspectVo.mcode = result.materialCode
@@ -661,6 +729,7 @@
                         userName: Array.from(new Set(userList)).join(","),
                         result: this.resultVal==null ? rVal : this.resultVal,
                     }]
+                    this.getProcessConfigFile()
                 }).catch(error=>{
                     console.error(error)
                 })
diff --git a/src/views/quality/processInspect/processInspect-form.vue b/src/views/quality/processInspect/processInspect-form.vue
index 319b24c..18e7222 100644
--- a/src/views/quality/processInspect/processInspect-form.vue
+++ b/src/views/quality/processInspect/processInspect-form.vue
@@ -288,6 +288,54 @@
                         </el-table-column>
                         </el-table>
                     </el-tab-pane>
+                    <el-tab-pane label="闄勪欢">
+                        <el-table :data="configFileTableData" height="400px">
+                            <el-table-column
+                            prop="orderNumber"
+                            align="center"
+                            label="璁㈠崟鍙�"
+                            show-overflow-tooltip
+                            >
+                            </el-table-column>
+                            <el-table-column
+                            prop="originalFileName"
+                            align="center"
+                            label="鍘熸枃浠跺悕"
+                            width="200"
+                            >
+                            </el-table-column>
+                            <el-table-column prop="fileName" align="center" label="鏂囦欢鍚庣紑">
+                            </el-table-column>
+                            <el-table-column prop="createUser" align="center" label="涓婁紶浜�">
+                            </el-table-column>
+                            <el-table-column
+                            prop="createTime"
+                            align="center"
+                            label="涓婁紶鏃堕棿"
+                            show-overflow-tooltip
+                            >
+                            </el-table-column>
+                            <el-table-column prop="updateUser" align="center" label="鏇存柊浜�">
+                            </el-table-column>
+                            <el-table-column
+                            prop="updateTime"
+                            align="center"
+                            label="鏇存柊鏃堕棿"
+                            show-overflow-tooltip
+                            >
+                            </el-table-column>
+                            <el-table-column fixed="right" align="center" label="鎿嶄綔">
+                            <template slot-scope="scope">
+                                <el-button
+                                @click="downloadProcessConfigFiles(scope.row)"
+                                type="text"
+                                size="small"
+                                >涓嬭浇</el-button
+                                >
+                            </template>
+                            </el-table-column>
+                        </el-table>
+                    </el-tab-pane>
                 </el-tabs>
             </div>
             <div class="finishedProduct-result">
@@ -362,11 +410,13 @@
     deleteProcessConfigFile,
     downloadProcessConfigFile
  } from '@/api/quality/attachment'
+import { getProcessConfigFile } from '@/api/plan/manufacturingorder'
 import processPart from '@/views/common/processinspect-part'
 import { selectDevice } from '@/api/quality/processInspect'
 import qrCodeApp from '@/views/common/qrCodeApp'
 import { validatePositiveInteger } from '@/util/validate'
 import { getStore } from '@/util/store'
+import * as customerorder from '@/api/plan/customerorder'
 export default {
     components:{
         qrCodeApp,processPart
@@ -426,6 +476,8 @@
             },
             inspectionItems: [], // 鏂板妫�楠岄」鐩〃鏍�
             inspectionResultForm: [],
+            configFileTableData:[],
+            dataForm:null
         }
     },
     watch: {
@@ -448,6 +500,21 @@
         this.init()
     },
     methods: {
+        getProcessConfigFile(){
+            getProcessConfigFile({
+            orderNumber: this.dataForm.orderNumber,
+            lineNumber: this.dataForm.customerNo
+            }).then((res)=>{
+                this.configFileTableData = res.data.data
+            })
+        },
+        downloadProcessConfigFiles(row){
+            customerorder.downloadProcessConfigFile(
+                row.fileName,
+                row.bucketName,
+                row.originalFileName
+            )
+        },
         saveTable(){
             let processInsProduct = [];
             this.inspectionItems.forEach((item) => {
@@ -642,6 +709,7 @@
                 queryById(id).then(res => {
                     let result = res.data.data
                     this.processInspectVo.moNo = result.moNo
+                    this.dataForm = result;
                     this.processInspectVo.operationTaskId = result.technologyOperationName
                     this.processInspectVo.proInsNo = result.proInsNo
                     this.processInspectVo.projectName = result.projectName
@@ -699,6 +767,7 @@
                         userName: Array.from(new Set(userList)).join(","),
                         result: this.resultVal == null ? rVal : this.resultVal,
                     }]
+                    this.getProcessConfigFile()
                 }).catch(error => {
                     console.log(error)
                 })

--
Gitblit v1.9.3