| | |
| | | label="供应商名称" |
| | | width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.input" placeholder="" ></el-input> |
| | | <el-input v-model="scope.row.supplier" placeholder="" ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | label="质量追溯号" |
| | | width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.input" placeholder="" ></el-input> |
| | | <el-input v-model="scope.row.qualityTraceability" placeholder="" ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | prop="address" |
| | | label="规格型号"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.input" placeholder="" ></el-input> |
| | | <el-input v-model="scope.row.specifications" placeholder="" ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | process:{}, |
| | | // handleClose:[], |
| | | checkTreeNode:{ |
| | | name:'剥缆' |
| | | id:2, |
| | | }, |
| | | tableData:[], |
| | | tableapi:[], |
| | | tableapi:[{ |
| | | supplier:'', |
| | | qualityTraceability:'', |
| | | name:'', |
| | | specifications:'', |
| | | unit:'', |
| | | }], |
| | | search:{ |
| | | type:'', |
| | | work:'', |
| | |
| | | form:{}, |
| | | dialogVisible:false, |
| | | typeselect:0, |
| | | tableData: [], |
| | | input:'', |
| | | craftapi:[], |
| | | } |
| | |
| | | } |
| | | }) |
| | | }, |
| | | //删除 |
| | | material() { |
| | | this.$axios.post(this.$api.url.material,{ |
| | | id:this.upData.id |
| | | }, { |
| | | addMbom(data) { |
| | | this.$axios.post(this.$api.url.addMbom,data |
| | | // { |
| | | // name:this.tableapi.name, |
| | | // qualityTraceability:this.tableapi.qualityTraceability, |
| | | // specifications:this.tableapi.specifications, |
| | | // supplier:this.tableapi.supplier, |
| | | // techTemId:this.craftapi.id, |
| | | // unit:this.tableapi.unit, |
| | | // } |
| | | , { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }).then(res =>{ |
| | | console.log(res); |
| | | this.$message.success('添加完成') |
| | | this.selectAllMbom() |
| | | this.tableapi = [{}] |
| | | }) |
| | | }, |
| | | //删除 |
| | | material(index) { |
| | | console.log(this.upData.id); |
| | | this.$axios.post(this.$api.url.material,{ |
| | | id:this.upData.id |
| | | }).then(res =>{ |
| | | this.$message.success(res.message) |
| | | this.tableData.splice(index,1) |
| | | |
| | | // console.log(res); |
| | | }) |
| | | }, |
| | | TYpe(val) { |
| | |
| | | params:{id:this.checkTreeNode.id} |
| | | }).then(res => { |
| | | this.tableData = res.data; |
| | | console.log(this.tableData); |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | |
| | | this.chooseTechFath() |
| | | }, |
| | | Addrow() { |
| | | if (this.tableData == undefined) { |
| | | this.tableData = new Array(); |
| | | if (this.tableapi == undefined) { |
| | | this.tableapi = new Array(); |
| | | } |
| | | let obj = []; |
| | | |
| | | this.tableData.push(obj); |
| | | this.tableapi.push(obj); |
| | | }, |
| | | skipshow(){ |
| | | console.log('666'); |
| | | const data = this.tableData.at(-1) |
| | | console.log(data); |
| | | let data = this.tableapi.at(-1) |
| | | // this.addMbom() |
| | | data.techTemId = this.search.craft |
| | | // console.log(this.search.craft); |
| | | // console.log(data); |
| | | |
| | | this.addMbom(data) |
| | | |
| | | this.dialogVisible = false |
| | | }, |
| | |
| | | }, |
| | | deleteRow(index, rows) { |
| | | console.log(rows); |
| | | this.tableData.splice(index,1) |
| | | // this.tableData.splice(index,1) |
| | | this.upData.id = rows.id |
| | | this.material() |
| | | console.log(this.upData); |
| | | this.material(index) |
| | | }, |
| | | |
| | | } |