s
王震
2023-11-09 0999d37d3b9d41b97d284d3a5b68193d4c311abc
src/views/quality/rawMaterial/rawMaterial-form.vue
@@ -442,14 +442,14 @@
      },
      // 添加行
      clickAddLine(row) {
        console.log(row);
        let ele = {
            fId: Math.random(),
            father: row.father?row.father:null,
            father: null,
            iid: Math.random(),
            children:[]
        }
        if(row){
          ele.father = row.father?row.father:null
          row.children.forEach(item => {
              ele.children.push({
                deviceId: null,
@@ -626,7 +626,21 @@
        row.children.push(obj)
      },
      save(){
        let data = this.dataForm
        console.log('--------',data);
        console.log("-----",this.list);
        this.list.forEach(item=>{
          item.children.forEach(c=>{
            let arr=c.testValueList
            let val=''
            arr.forEach(a=>{
              val+=a+","
            })
            let end=val.substring(0,val.length-1)
            c.testValue=end
          })
        })
        data.rawInsProducts = this.list
        addRawInspects(data).then(res=>{
            this.$message.success("保存成功")