王震
2023-09-14 216949ed487fb9519c5c85b4fcf7ee54daf9c140
src/components/view/mbom.vue
@@ -219,24 +219,17 @@
               }
            })
         },
         addMbom(data) {
            this.$axios.post(this.$api.url.addMbom,data,{
               // params:{
               //    techTemId:this.craftapi.id,
               //    mbomModelDto2List:[{
               //       name:this.tableapi.name,
               //       qualityTraceability:this.tableapi.qualityTraceability,
               //       specifications:this.tableapi.specifications,
               //       supplier:this.tableapi.supplier,
               //       unit:this.tableapi.unit,
               //    }]
               // }
         addMbom(data,cc) {
            this.$axios.post(this.$api.url.addMbom,{
                  mbomModelDto2List:data,
                  techTemId:cc,
            }, {
               headers: {
                      "Content-Type": "application/json"
                    }
            }).then(res =>{
               console.log(res);
               // console.log(res);
               this.$message.success('添加完成')
               this.selectAllMbom()
               this.tableapi = [{}]
@@ -338,14 +331,14 @@
         if (this.tableapi == undefined) {
            this.tableapi = new Array();
         }
         let obj = [];
         let obj = {};
         this.tableapi.push(obj);
         },
         skipshow() {
            console.log('666');
            let data = this.tableapi.at(-1)
            data.techTemId = this.search.craft
            this.addMbom(data)
            // let data = this.tableapi.at(-1)
            // console.log(this.tableapi);
            let cc = this.search.craft
            this.addMbom(this.tableapi,cc)
            this.dialogVisible = false
         },
         //delAllMbom 批量删除