86134
2023-11-07 73983f9d7f0e0dbc12b8f3ac3a39e4e15769db16
src/views/quality/processInspect/processInspect-form.vue
@@ -113,11 +113,26 @@
                                        <el-select style="width:100%" v-model="scope.row.eId" 
                                        v-if="scope.row.iname != null" filterable @change="updateDevice(scope.row,scope.$index)">
                                            <el-option v-for="(item,index) in deviceList" 
                                            :key="index" :value="item.id" :label="item.number +'-'+ item.name"></el-option>
                                            :key="index" :value="item.id" :label="item.code +'-'+ item.name"></el-option>
                                        </el-select>
                                    </div>
                                </template>
                            </el-table-column>
                            <el-table-column  label="检验描述"
                                width="240" style="text-align: center;">
                                <template slot-scope="scope">
                                        <el-tooltip v-if="scope.row.iname!=null" :disabled="scope.row.eId != null"
                                        class="item" effect="dark" content="请先选择设备!"
                                            placement="top-start">
                                            <el-input :disabled="scope.row.eId == null" v-model="scope.row.inote"
                                         placeholder="请输入检验描述"></el-input>
                                            <span v-if="resultVal != null && processInspectVo.id!=null" v-text="scope.row.inote"></span>
                                        </el-tooltip>
                                </template>
                            </el-table-column>
                            <el-table-column label="结论" fixed="right" min-width="100">
                                <template slot-scope="scope">
                                    <div v-if="scope.row.iname!=null">
@@ -218,6 +233,7 @@
            this.init()
        },
        methods: {
            submitSave(){
                let pro = 0
                console.log(this.inspectionItems);
@@ -288,6 +304,7 @@
                let id = this.processInspectVo.id
                if(id != null){
                    queryById(id).then(res=>{
                        console.log(res)
                        let result = res.data.data
                        this.processInspectVo.orderNumber = result.orderNumber
                        this.processInspectVo.materialCode = result.materialCode
@@ -300,6 +317,7 @@
                        result.children.forEach(item=>{
                            item.iid = Math.random()
                            if(item.children != undefined){
                                item.children.forEach(obj=>{
                                    let arr = []
                                    if(obj.userName){
@@ -309,6 +327,9 @@
                                        arr = obj.inspectionValue.split(",")
                                    }
                                    obj.empiricalValueAddss = arr
                                    if(obj.note){
                                        snote=obj.inote
                                    }
                                    if(arr.length > this.empiricalValueAdd){
                                        this.empiricalValueAdd = arr.length
                                    }
@@ -316,6 +337,7 @@
                            }
                        })
                        this.inspectionItems = result.children
                        console.log(result.children)
                        this.inspectionResultForm = [{
                            materialCode: result.materialCode,
                            material: result.material,
@@ -330,15 +352,18 @@
            getDeviceList(){
                selectDevice(null).then(res=>{
                    this.deviceList = res.data.data
                    console.log(this.deviceList);
                })
            },
            updateDevice(row,index){
                console.log(row);
                updateDeviceBypppId({equiomentId:row.eId,ppid:row.iId}).then(res=>{
                    this.inspectionItems.forEach(obj=>{
                        if(obj.children){
                            obj.children[index-1].inspectionValue = ''
                            obj.children[index-1].iresult = null
                            obj.children[index-1].empiricalValueAddss = []
                             obj.children[index-1].inote=''
                        }
                    })
                }).catch(error=>{
@@ -357,6 +382,8 @@
                this.technologyList = sample.children
            },
            changeState(row, index) {
                console.log(row)
                if (row.iid != null && row.iid != '') {
                    let str = ""
                    row.empiricalValueAddss.forEach(e => {
@@ -366,11 +393,19 @@
                    if (str === undefined || str === '' || str === null ) {
                        return
                    }
                // if ( note === undefined || str === '' || str === null ) {
                //         return
                //     }
                    let obj = {
                        equiomentId: row.eId,
                        ppid: row.iid,
                        inspectionValue: str
                        inspectionValue: str,
                        note:row.inote,
                    }
                    updateProcessInsProduct(obj).then(res=>{
                        if(res.data.code == 0){
                            this.$message.success("更新成功")
@@ -394,6 +429,7 @@
                                if(item.children != undefined){
                                    item.children.forEach(obj=>{
                                        obj.empiricalValueAddss = []
                                        // obj.note=[];
                                    })
                                }
                            })
@@ -410,8 +446,10 @@
                chooseMater({
                        orderNumber: this.processInspectVo.orderNumber
                    }).then(res => {
                    if (res.data.data != null) {
                        this.optionsSamplename = res.data.data.children
                    } else {
                        this.$message({
                            message: '没有该订单号!',