| | |
| | | </el-row> |
| | | </div> |
| | | <div> |
| | | <el-dialog |
| | | title="物料清单的维护" |
| | | :visible.sync="dialogVisible" |
| | | width="80%" |
| | | :before-close="handleClose" :center="true"> |
| | | <el-dialog title="物料清单的维护" :visible.sync="dialogVisible" width="80%" :before-close="handleClose" :center="true"> |
| | | <div> |
| | | <el-form> |
| | | <el-row :gutter="2"> |
| | | <el-col :span="8"> |
| | | <el-form-item label="类型:"> |
| | | <el-select v-model="search.type" size="small" placeholder="请选择" style="width: 224px;margin-right: 30px;"> |
| | | <el-select v-model="search.type" size="small" placeholder="请选择" |
| | | style="width: 224px;margin-right: 30px;"> |
| | | <el-option label="橡胶连接器" :value="0"></el-option> |
| | | <el-option label="金属连接器" :value="1"></el-option> |
| | | <el-option label="湿插拔电连接器" :value="2"></el-option> |
| | |
| | | <el-col :span="8"> |
| | | <el-form-item label="工序"> |
| | | <template> |
| | | <el-select v-model="search.work" |
| | | placeholder="请选择" |
| | | allow-create |
| | | filterable |
| | | @change="workevent" |
| | | > |
| | | <el-option |
| | | v-for="(item,index) in process" |
| | | :key="item.name" |
| | | :label="item.name" |
| | | :value="item.name"> |
| | | <el-select v-model="search.work" placeholder="请选择" allow-create filterable @change="workevent"> |
| | | <el-option v-for="(item,index) in process" :key="item.name" :label="item.name" :value="item.name"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-form-item label="工艺名称:"> |
| | | <el-select v-model="search.craft" size="small" placeholder="请选择" style="width: 224px;margin-right: 30px;"> |
| | | <el-option |
| | | v-for="item in craftapi" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | <el-select v-model="search.craft" size="small" placeholder="请选择" |
| | | style="width: 224px;margin-right: 30px;"> |
| | | <el-option v-for="item in craftapi" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | </div> |
| | | <div style="margin: 10px 0px;"> |
| | | <template> |
| | | <el-table |
| | | border |
| | | :data="tableapi" |
| | | height="calc(80vh - 250px)" |
| | | style="width: 100%"> |
| | | <el-table border :data="tableapi" height="calc(80vh - 250px)" style="width: 100%"> |
| | | <el-table-column type="index" label="序号" width="70"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="date" |
| | | label="供应商名称" |
| | | width="180"> |
| | | <el-table-column prop="date" label="供应商名称" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.supplier" placeholder="" ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="" |
| | | label="质量追溯号" |
| | | width="180"> |
| | | <el-table-column prop="" label="质量追溯号" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.qualityTraceability" placeholder="" ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="name" |
| | | label="原材料名称"> |
| | | <el-table-column prop="name" label="原材料名称"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.name" placeholder="" ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="address" |
| | | label="规格型号"> |
| | | <el-table-column prop="address" label="规格型号"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.specifications" placeholder="" ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="unit" |
| | | label="单位"> |
| | | <el-table-column prop="unit" label="单位"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.unit" placeholder="" ></el-input> |
| | | </template> |
| | |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | |
| | | <div class="choose"> |
| | | <span>类型:</span> |
| | | <el-select v-model="search.type" size="small" @change="TYpe" placeholder="请选择" style="width: 224px;margin-right: 30px;"> |
| | | <el-select v-model="search.type" size="small" @change="TYpe" placeholder="请选择" |
| | | style="width: 224px;margin-right: 30px;"> |
| | | <el-option label="橡胶连接器" :value="0"></el-option> |
| | | <el-option label="金属连接器" :value="1"></el-option> |
| | | <el-option label="湿插拔电连接器" :value="2"></el-option> |
| | |
| | | </div> |
| | | <div class="thing"> |
| | | <div class="left"> |
| | | <el-input v-model="search.technology" @input="query" suffix-icon="el-icon-search" placeholder="请输入搜索内容" size="small" clearable ></el-input> |
| | | <el-tree |
| | | :data="list" ref="tree" |
| | | style="height: 500px;overflow-y: auto;" |
| | | highlight-current |
| | | :props="{children: 'children',label: 'name'}" |
| | | node-key="name" |
| | | default-expand-all |
| | | <el-input v-model="search.technology" @input="query" suffix-icon="el-icon-search" placeholder="请输入搜索内容" |
| | | size="small" clearable></el-input> |
| | | <el-tree :data="list" ref="tree" style="overflow-y: auto;" highlight-current |
| | | :props="{children: 'children',label: 'name'}" node-key="name" default-expand-all |
| | | @node-click="handleNodeClick" > |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <span><i :class="`node_i ${data.code != '[2]'?'el-icon-folder-opened':'el-icon-tickets'}`"></i> |
| | |
| | | process:{}, |
| | | // handleClose:[], |
| | | checkTreeNode:{ |
| | | id:2, |
| | | id:'', |
| | | }, |
| | | tableData:[], |
| | | tableapi:[{ |
| | |
| | | //新增 |
| | | chooseTechFath() { |
| | | this.$axios.get(this.$api.url.chooseTechFath,{ |
| | | params:{type:this.typeselect} |
| | | params: { |
| | | type: this.typeselect |
| | | } |
| | | }).then(res => { |
| | | this.process = res.data; |
| | | console.log(this.process); |
| | |
| | | }) |
| | | }, |
| | | addMbom(data) { |
| | | this.$axios.post(this.$api.url.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, |
| | | // techTemId:this.craftapi.id, |
| | | // unit:this.tableapi.unit, |
| | | // }] |
| | | // } |
| | | , { |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | |
| | | this.$nextTick(() => { |
| | | this.$refs.tree.setCurrentKey(this.list[0].children[0].name) // 默认选中节点第一个 |
| | | }) |
| | | let one=this.list.filter(item=>{ |
| | | return item.children.length>0 |
| | | })[0] |
| | | console.log(one); |
| | | let name=one.children[0].id |
| | | console.log(name); |
| | | this.selectAllMbomStart(name) |
| | | this.selectDataList(); |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | | } |
| | | }) |
| | | }, |
| | | selectAllMbomStart(name) { |
| | | this.$axios.get(this.$api.url.selectAllMbom,{ |
| | | params:{id:name} |
| | | }).then(res => { |
| | | this.tableData = res.data; |
| | | console.log(this.tableData); |
| | | }, { |
| | | headers: { |
| | | "Content-Type": "application/json" |
| | |
| | | //右边 |
| | | selectAllMbom() { |
| | | this.$axios.get(this.$api.url.selectAllMbom,{ |
| | | params:{id:this.checkTreeNode.id} |
| | | params: { |
| | | id: this.checkTreeNode.id |
| | | } |
| | | }).then(res => { |
| | | this.tableData = res.data; |
| | | console.log(this.tableData); |
| | |
| | | }, |
| | | handleNodeClick(data){ |
| | | this.checkTreeNode = data |
| | | console.log(data); |
| | | console.log(this.checkTreeNode.id); |
| | | this.selectAllMbom() |
| | | }, |
| | |
| | | }) |
| | | .catch(_ => {}); |
| | | }, |
| | | //新增 |
| | | event(){ |
| | | this.dialogVisible = true |
| | | this.chooseTechFath() |
| | | }, |
| | | //添加行 |
| | | Addrow() { |
| | | if (this.tableapi == undefined) { |
| | | this.tableapi = new Array(); |
| | | } |
| | | let obj = []; |
| | | |
| | | this.tableapi.push(obj); |
| | | }, |
| | | skipshow(){ |
| | | console.log('666'); |
| | | 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 |
| | | }, |
| | | //delAllMbom 批量删除 |
| | |
| | | .title * { |
| | | font-size: 16px; |
| | | } |
| | | |
| | | .choose-1{ |
| | | padding: 5px 24px; |
| | | display: flex; |
| | |
| | | height: calc(100% - 20px); |
| | | border-right: 3px solid rgb(245, 247, 251); |
| | | padding: 16px; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .thing .left .custom-tree-node span { |