zouyu
2024-01-11 980c3462a70d137b3f54f171c7989bb4cfe3b4ef
包装检验模板管理-修改
已修改2个文件
40 ■■■■ 文件已修改
src/views/quality/finishedProductInspection/finishedProduct-form.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/packageInspectTemplate/inspect-detail.vue 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/quality/finishedProductInspection/finishedProduct-form.vue
@@ -349,7 +349,7 @@
        }
      },
      codeDevice(row,index){
        this.row=row
        this.row=row
        console.log("row",row);
        this.deviceCode =true
        this.$refs.codeDeviceCompont.openCamera()
@@ -440,6 +440,7 @@
                    this.processInspectVo.documentId = result.documentId
                    this.processInspectVo.outBatchNo = result.outBatchNo
                    this.processInspectVo.locName = result.locName
                    this.processInspectVo.productNo = result.productNo
                    let userList = []
                    result.children.forEach(item=>{
                        item.iid = Math.random()
@@ -626,7 +627,7 @@
                                updateFinishedInsProduct(obj).then(res => {
                                    if (res.data.code == 0) {
                                        this.init()
                                    }
                                    }
                                })
                            }
                        })
src/views/quality/packageInspectTemplate/inspect-detail.vue
@@ -14,6 +14,20 @@
        @row-save="addInspectHandler"
        @row-del="delInspectHandler"
        :page="page">
            <template slot="inspectNameForm" slot-scope="scope">
                <el-input
                placeholder="请输入检验项目名称"
                type="textarea"
                v-model="scope.row.inspectName"
                :rows="2" />
            </template>
            <template slot="inspectRequiredForm" slot-scope="scope">
                <el-input
                placeholder="请输入检验标准"
                type="textarea"
                v-model="scope.row.inspectRequired"
                :rows="2" />
            </template>
            <template #menu="{size,row,index}">
                <el-button v-if="row.children!=null" class="menu-button" :size="size" @click="addChildren(size,row,index)" type="text" icon="el-icon-circle-plus-outline">添加子项目</el-button>
                <el-button v-if="row.children==null" class="menu-button" :size="size" @click="showUpdateDialog(size,row,index)" type="text" icon="el-icon-edit">编辑</el-button>
@@ -71,7 +85,7 @@
        </el-form>
        <span slot="footer" class="dialog-footer">
            <el-button @click="addChildrenVisible = false">取 消</el-button>
            <el-button type="primary" @click="addInspectHandler">确 定</el-button>
            <el-button type="primary" @click="addChildrenHandler">确 定</el-button>
        </span>
    </el-dialog>
</div>
@@ -164,9 +178,24 @@
    },
    methods:{
        addChildren(size,row,index){
            console.log(row);
            this.addChildrenForm.inspectName = row.inspectName
            this.addChildrenVisible = true
        },
        addInspectHandler(row,done,loading){
            const _than = this
            let obj = {
                parentId: this.paramObj.id,
                ...row
            }
            addInspect(obj).then(res=>{
                if(res.status===200){
                    _than.getData()
                    _than.$message.success("添加成功")
                }
            }).catch(error=>{
                console.error(error)
            })
            done()
        },
        delInspectHandler(size,row,index){
            const _than = this
@@ -208,7 +237,7 @@
                }
            })
        },
        addInspectHandler(){
        addChildrenHandler(){
            const _than = this
            this.$refs.addChildrenForm.validate(valid=>{
                if(valid){