From d271f2493796a557eac67b95b310df776abaf48b Mon Sep 17 00:00:00 2001
From: licp <lichunping@guanfang.com.cn>
Date: 星期一, 06 五月 2024 16:15:24 +0800
Subject: [PATCH] 修改产品检,不合格处理等页面

---
 src/views/quality/finishedProductInspection/finishedProduct-form.vue |  113 ++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 96 insertions(+), 17 deletions(-)

diff --git a/src/views/quality/finishedProductInspection/finishedProduct-form.vue b/src/views/quality/finishedProductInspection/finishedProduct-form.vue
index 162fe06..f427a02 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){
@@ -553,22 +620,31 @@
                 result: this.inspectionResultForm[0].result
             }
             if (pro > 0) {
-                this.$prompt('璇疯緭鍏ヤ笉鍚堟牸鏁伴噺', '涓嶅悎鏍兼暟閲�', {
-                    confirmButtonText: '纭畾',
-                    cancelButtonText: '鍙栨秷',
-                    inputPattern: /^\d+$/,
-                    inputErrorMessage: '璇疯緭鍏ユ纭暟瀛楁牸寮�'
-                }).then(({ value }) => {
-                    obj.number = value
-                    updateFinishedInspectById(obj).then(res => {
-                        if(res.data.data.indexOf("鎴愬姛") > 0){
-                            this.$message.success("涓婃姤鎴愬姛");
-                            this.checkTestState()
-                        }else{
-                            this.$message.warning(res.data.data)
-                        }
-                    });
-                }).catch(() => {});
+                obj.number = 1;
+                updateFinishedInspectById(obj).then(res => {
+                    if(res.data.data.indexOf("鎴愬姛") > 0){
+                        this.$message.success("涓婃姤鎴愬姛");
+                        this.checkTestState()
+                    }else{
+                        this.$message.warning(res.data.data)
+                    }
+                });
+                // this.$prompt('璇疯緭鍏ヤ笉鍚堟牸鏁伴噺', '涓嶅悎鏍兼暟閲�', {
+                //     confirmButtonText: '纭畾',
+                //     cancelButtonText: '鍙栨秷',
+                //     inputPattern: /^\d+$/,
+                //     inputErrorMessage: '璇疯緭鍏ユ纭暟瀛楁牸寮�'
+                // }).then(({ value }) => {
+                //     obj.number = value
+                //     updateFinishedInspectById(obj).then(res => {
+                //         if(res.data.data.indexOf("鎴愬姛") > 0){
+                //             this.$message.success("涓婃姤鎴愬姛");
+                //             this.checkTestState()
+                //         }else{
+                //             this.$message.warning(res.data.data)
+                //         }
+                //     });
+                // }).catch(() => {});
             }else{
                 updateFinishedInspectById(obj).then(res => {
                     if(res.data.data.indexOf("鎴愬姛") > 0){
@@ -601,6 +677,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
@@ -628,7 +705,8 @@
                                 if(obj.inspectionValue){
                                     arr = obj.inspectionValue.split(",")
                                 }
-                                obj.empiricalValueAddss = arr
+                                this.$set(obj,'empiricalValueAddss',arr)
+                                // obj.empiricalValueAddss = arr
                                 if(obj.note){
                                         snote=obj.inote
                                     }
@@ -661,6 +739,7 @@
                         userName: Array.from(new Set(userList)).join(","),
                         result: this.resultVal==null ? rVal : this.resultVal,
                     }]
+                    this.getProcessConfigFile()
                 }).catch(error=>{
                     console.error(error)
                 })

--
Gitblit v1.9.3