Crunchy
2024-05-06 786563298fa34e83409aec052a1bf21329164d67
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
@@ -666,7 +734,7 @@
                                if (obj.inspectionValue) {
                                    arr = obj.inspectionValue.split(",")
                                }
                                obj.empiricalValueAddss = arr
                                this.$set(obj, "empiricalValueAddss", arr)
                                if(!obj.inote){
                                    obj.inote = null
                                }
@@ -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)
                })
@@ -810,6 +879,7 @@
                            this.processInspectVo.orderNumber = data.orderNumber
                            this.processInspectVo.projectName = data.projectName
                            this.processInspectVo.customerName = data.customerName
                            this.processInspectVo.customerNo = data.customerNo
                            this.processInspectVo.material = data.material
                            this.processInspectVo.specs = data.specs
                            this.processInspectVo.unit = data.unit