zss
2023-09-14 4c5c20a7c03539104df74072b1b8a81b51c19ab8
src/components/view/finishedProductInspectionAdd.vue
@@ -6,9 +6,9 @@
                <el-col :span="12">新增产品检验单</el-col>
                <el-col :span="12" style="text-align: right;">
                    <!-- 点击返回,当前页面值为false -->
                    <el-button type="primary" size="mini" style="background: #004EA2; "
                        icon="el-icon-circle-plus-outline">新增</el-button>
                    <el-button @click="showAddPage = false" type="primary" size="mini" icon="el-icon-back"
                    <!-- <el-button type="primary" size="mini" style="background: #004EA2; "
                        icon="el-icon-circle-plus-outline">新增</el-button> -->
                    <el-button @click="comBack" type="primary" size="mini" icon="el-icon-back"
                        style="background: #004EA2; ">返回</el-button>
                </el-col>
            </el-row>
@@ -178,7 +178,7 @@
            showUp: false,
            isAddProject: false,
            showLook: false,
            detailId: 28,
            detailId: 0,
            rowInfp: {},
            search: {
                countSize: 10,
@@ -267,7 +267,7 @@
        }
    },
    mounted() {
        // this.getTableData()
        this.getTableData()
        this.getOptions();
    },
    methods: {
@@ -280,6 +280,9 @@
            this.processInspectVo.mcode=sample.mcode
            this.processInspectVo.specificationsModel=sample.specifications
            this.processInspectVo.unit=sample.unit
        },
        comBack(){
            this.$parent.comBackMain()
        },
        handleClick(row) {
            this.rowInfp = row
@@ -333,7 +336,7 @@
                this.$axios
                    .post(this.$api.url.inspectionItemUpdateDevByInsId, {
                        id: this.clickSelectDevice.rpId,
                        type: 1,
                        type: 2,
                        devId: this.nodeData.id
                    })
                    .then(res => {
@@ -417,14 +420,14 @@
            this.optionTechnology = working.children
        },
        addTestProjevt() {
            this.isAddProject = true
            // this.isAddProject = true
            let val = JSON.parse(JSON.stringify(this.processInspectVo))
            val.material = this.processInspectVo.material.split("-")[1]
            val.id=this.processInspectVo.material.split("-")[0]
            this.$axios.post(this.$api.url.finishedInspectAddFinish, val, {
                headers: { "Content-Type": "application/json" }
            }).then(res => {
                if (res.code === 201) {
                if (res.code == 201) {
                    this.$message({
                        message: res.message,
                        type: 'warning'
@@ -432,19 +435,21 @@
                    return
                }
                this.detailId = res.data
                console.log(this.detailId);
                this.inspectionResultForm[0].id = val.materialCode
                this.inspectionResultForm[0].id = val.mcode
                this.inspectionResultForm[0].name = val.material
                // this.getTableData()
                this.getTableData()
            })
        },
        getTableData() {
            this.$axios.get(this.$api.url.inspectionItemListUser, {
                params: {
                    id: this.detailId,
                    type: 1
                    type: 2
                }
            }).then(res => {
                if (res.data.length < 1) {
                    return
                }
                this.inspectionItems = res.data
                let arr = []
                let val = JSON.parse(JSON.stringify(this.inspectionItems))