modified: src/App.vue
modified: src/components/view/standard-table/material.vue
modified: src/components/view/standard-table/target.vue
modified: src/components/view/standard-table/technology.vue
modified: src/components/view/standard.vue
| | |
| | | border-radius: 6px; |
| | | } |
| | | |
| | | /* el-tree-table折叠(展开、收缩)图标定位 */ |
| | | /* .el-table [class*="el-table__row--level-1"] .el-table__expand-icon { |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | position: absolute; |
| | | right: -40px; |
| | | top: 16px; |
| | | z-index: 999; |
| | | } |
| | | .el-table [class*="el-table__row--level-2"] .el-table__expand-icon { |
| | | font-size: 18px; |
| | | font-weight: bold; |
| | | position: absolute; |
| | | right: -230px; |
| | | top: 16px; |
| | | z-index: 999; |
| | | } */ |
| | | |
| | | table { |
| | | border-collapse: collapse; |
| | | } |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="tname" sortable label="工艺名称"> |
| | | <template slot-scope="scope"> |
| | | <el-tag type="success" v-if="scope.row.tname != null">02</el-tag> |
| | | <el-tag type="success" v-if="scope.row.tname != null" |
| | | style="margin-left:20px;">02</el-tag> |
| | | <span style="color: #000000"> |
| | | {{ scope.row.tname }} |
| | | </span> |
| | |
| | | <el-table-column prop="num" label="数量"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.num" |
| | | v-if="scope.row.mname != null" |
| | | v-if="scope.row.mname != null" size="small" |
| | | @blur="updateVal(scope.row)"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <template> |
| | | <div class="standard"> |
| | | <div> |
| | | <el-table ref="multipleTable" :data="tableData" row-key="rowId" border max-height="675" |
| | | @select-all="selectAll" @select="selectTr" |
| | | <el-table ref="multipleTable" :data="aa" row-key="rowId" border max-height="675" |
| | | @select-all="selectAll" @select="selectTr" |
| | | @selection-change="handleSelectionChange" default-expand-all |
| | | :tree-props="{children: 'children', hasChildren: 'hasChildren'}"> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | |
| | | <span>{{scope.row.tfather}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="tname" label="工艺名称"> |
| | | <el-table-column prop="tname" label="工艺名称" indent="110"> |
| | | <template slot-scope="scope"> |
| | | <el-tag type="success" v-if="scope.row.tname != null">02</el-tag> |
| | | <el-tag type="success" v-if="scope.row.tname != null" |
| | | style="line-height:24px;text-align:center;width:36px;height:24px;margin-left:20px;border-radius:12px">02</el-tag> |
| | | <span>{{scope.row.tname}}</span> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-table-column prop="internal" label="内控值"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.internal" |
| | | v-if="scope.row.pname != null" |
| | | v-if="scope.row.pname != null" size="small" |
| | | @blur="updateVal(scope.row)"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="required" label="标准值"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.required" |
| | | v-if="scope.row.pname != null" |
| | | v-if="scope.row.pname != null" size="small" |
| | | @blur="updateVal(scope.row)"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | selects: [], |
| | | deleteList:[], |
| | | isAllSelect:false, |
| | | aa: [ |
| | | { |
| | | "children": [ |
| | | { |
| | | "children": [ |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "oo", |
| | | "pname": "阿发", |
| | | "pid": 933, |
| | | "rowId": 0.15062765172836556, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "km", |
| | | "pname": "电2", |
| | | "pid": 934, |
| | | "rowId": 0.12313308041936621, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "ll", |
| | | "pname": "电3", |
| | | "pid": 935, |
| | | "rowId": 0.3959020806139848, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "让我去", |
| | | "pname": "还是的人会受到", |
| | | "pid": 941, |
| | | "rowId": 0.4501313017235842, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "发二手房", |
| | | "pname": "福娃", |
| | | "pid": 942, |
| | | "rowId": 0.2570941856592921, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "阿嗯嗯", |
| | | "pname": "1阿", |
| | | "pid": 943, |
| | | "rowId": 0.3849246876222272, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "sef", |
| | | "pname": "gsd", |
| | | "pid": 952, |
| | | "rowId": 0.3358017758829086, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "电气性能", |
| | | "rowId": 0.11597152206451145, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "吨", |
| | | "pname": "机1", |
| | | "pid": 936, |
| | | "rowId": 0.09276663783212125, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "天", |
| | | "pname": "机2", |
| | | "pid": 937, |
| | | "rowId": 0.30524372216363194, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "机械", |
| | | "rowId": 0.7172228698155356, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "t", |
| | | "pname": "耐1", |
| | | "pid": 938, |
| | | "rowId": 0.19975939946800714, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "ml", |
| | | "pname": "耐2", |
| | | "pid": 939, |
| | | "rowId": 0.8998139964427834, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "只", |
| | | "pname": "耐3", |
| | | "pid": 940, |
| | | "rowId": 0.5675579627028025, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "耐电压", |
| | | "rowId": 0.21440785353613157, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "按上次的非常", |
| | | "pname": "大手大脚", |
| | | "pid": 944, |
| | | "rowId": 0.7181582304087455, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "你好", |
| | | "rowId": 0.7769908541698349, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "爱国VSv", |
| | | "pname": "阿萨", |
| | | "pid": 945, |
| | | "rowId": 0.17378991618309336, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "大家好", |
| | | "rowId": 0.8772679053462382, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "ww", |
| | | "pname": "ww", |
| | | "pid": 946, |
| | | "rowId": 0.05009672998084547, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "cao", |
| | | "rowId": 0.9565056824143869, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "达瓦", |
| | | "pname": "我的", |
| | | "pid": 947, |
| | | "rowId": 0.34581383239188046, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "我的", |
| | | "pname": "青蛙大全", |
| | | "pid": 948, |
| | | "rowId": 0.5292322880840665, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "我的钱", |
| | | "pname": "取得完全的", |
| | | "pid": 949, |
| | | "rowId": 0.9125913254753026, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "请问", |
| | | "pname": "当前", |
| | | "pid": 950, |
| | | "rowId": 0.7560056072797159, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "sdv", |
| | | "pname": "士大夫", |
| | | "pid": 951, |
| | | "rowId": 0.5833122419533638, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "你锕", |
| | | "rowId": 0.9766279468505832, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "阿达", |
| | | "pname": "打啊·", |
| | | "pid": 953, |
| | | "rowId": 0.9092338815452841, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "阿迪王", |
| | | "rowId": 0.8799322497096753, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "tname": "裁缆", |
| | | "rowId": 0.4071356283291181, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "kv", |
| | | "pname": "长1", |
| | | "pid": 954, |
| | | "rowId": 0.035463253161200026, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "vv", |
| | | "pname": "长2", |
| | | "pid": 955, |
| | | "rowId": 0.23952996321663345, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "mm", |
| | | "pname": "长3", |
| | | "pid": 956, |
| | | "rowId": 0.0009274727073673716, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "长度", |
| | | "rowId": 0.7634749065969555, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "吨", |
| | | "pname": "面", |
| | | "pid": 957, |
| | | "rowId": 0.18887461651501813, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "面积", |
| | | "rowId": 0.1800874562308441, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "c", |
| | | "pname": "湿", |
| | | "pid": 958, |
| | | "rowId": 0.79648815170558, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "湿度", |
| | | "rowId": 0.10207617486870801, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "tname": "剥缆", |
| | | "rowId": 0.6177353372974288, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "mm", |
| | | "pname": "电1", |
| | | "pid": 959, |
| | | "rowId": 0.14165010419857826, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "km", |
| | | "pname": "电2", |
| | | "pid": 960, |
| | | "rowId": 0.5001292363854433, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "ll", |
| | | "pname": "电3", |
| | | "pid": 961, |
| | | "rowId": 0.8459604367887481, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "电气性能", |
| | | "rowId": 0.7238366441537252, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "吨", |
| | | "pname": "机1", |
| | | "pid": 962, |
| | | "rowId": 0.5558158468437493, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "天", |
| | | "pname": "机2", |
| | | "pid": 963, |
| | | "rowId": 0.750487727539507, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "机械", |
| | | "rowId": 0.08099595277723015, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "tname": "剪线", |
| | | "rowId": 0.6857832066163772, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "t", |
| | | "pname": "耐1", |
| | | "pid": 964, |
| | | "rowId": 0.025681390736394416, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "ml", |
| | | "pname": "耐2", |
| | | "pid": 965, |
| | | "rowId": 0.36284806597904873, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "只", |
| | | "pname": "耐3", |
| | | "pid": 966, |
| | | "rowId": 0.32910729115405535, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "耐电压", |
| | | "rowId": 0.41438839964145635, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "kv", |
| | | "pname": "长1", |
| | | "pid": 967, |
| | | "rowId": 0.3918751838800807, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "mm", |
| | | "pname": "问问", |
| | | "pid": 968, |
| | | "rowId": 0.5686737935255044, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "长度", |
| | | "rowId": 0.4897629570966928, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "tname": "穿线", |
| | | "rowId": 0.4459890408806282, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "tfather": "下料", |
| | | "rowId": 0.8390882975115925, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "children": [ |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "vv", |
| | | "pname": "长2", |
| | | "pid": 969, |
| | | "rowId": 0.16863376578504718, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "mm", |
| | | "pname": "长3", |
| | | "pid": 970, |
| | | "rowId": 0.2900238044012753, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "长度", |
| | | "rowId": 0.37669687690143516, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "吨", |
| | | "pname": "面", |
| | | "pid": 971, |
| | | "rowId": 0.36760765245674576, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "面积", |
| | | "rowId": 0.41655397960844853, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "c", |
| | | "pname": "湿", |
| | | "pid": 972, |
| | | "rowId": 0.8013524859108032, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "湿度", |
| | | "rowId": 0.30068963405418225, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "tname": "支撑块环氧", |
| | | "rowId": 0.7725045227516729, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "tfather": "支撑块环氧", |
| | | "rowId": 0.7921741302395957, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "children": [ |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "t", |
| | | "pname": "耐1", |
| | | "pid": 978, |
| | | "rowId": 0.7281043795556847, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "ml", |
| | | "pname": "耐2", |
| | | "pid": 979, |
| | | "rowId": 0.015058429562420983, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "只", |
| | | "pname": "耐3", |
| | | "pid": 980, |
| | | "rowId": 0.5169165422760948, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "耐电压", |
| | | "rowId": 0.9785158882428673, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "kv", |
| | | "pname": "长1", |
| | | "pid": 981, |
| | | "rowId": 0.9534130099287508, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "长度", |
| | | "rowId": 0.4408411939308432, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "tname": "壳体喷砂", |
| | | "rowId": 0.47569680349711807, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "tfather": "喷砂", |
| | | "rowId": 0.7110660336124821, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "children": [ |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "vv", |
| | | "pname": "长2", |
| | | "pid": 982, |
| | | "rowId": 0.6503541323269595, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "unit": "mm", |
| | | "pname": "长3", |
| | | "pid": 983, |
| | | "rowId": 0.32814600334581456, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "长度", |
| | | "rowId": 0.7584791572708673, |
| | | "indents": 1 |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "unit": "吨", |
| | | "pname": "面", |
| | | "pid": 984, |
| | | "rowId": 0.37940516060114016, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "pfather": "面积", |
| | | "rowId": 0.12296115468577762, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "tname": "电缆打磨", |
| | | "rowId": 0.5185983654517894, |
| | | "indents": 1 |
| | | } |
| | | ], |
| | | "tfather": "焊接", |
| | | "rowId": 0.08397884001890477, |
| | | "indents": 1 |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | props:['tableData','tableType'], |
| | | created() {}, |
| | | mounted() {}, |
| | | // props:['tableData','tableType'], |
| | | created() { |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | methods: { |
| | | bb(){ |
| | | console.log(this.aa); |
| | | }, |
| | | // 表格树全部选中配置 |
| | | // 全选/取消选操作 |
| | | selectAll(val) { |
| | |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column sortable label="工艺名称"> |
| | | <el-table-column sortable label="工艺名称" width="200"> |
| | | <template slot-scope="scope"> |
| | | <el-tag type="success" v-if="!scope.row.children">02</el-tag> |
| | | <span style="color: black">{{ scope.row.name }}</span> |
| | |
| | | <el-table-column prop="pq" label="生产定额(个/天)"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.pq" |
| | | v-if="scope.row.dg != null" |
| | | v-if="scope.row.dg != null" size="small" |
| | | @blur="updatePq(scope.row)" |
| | | ></el-input> |
| | | </template> |
| | |
| | | </div> |
| | | <div class="thing"> |
| | | <div class="left"> |
| | | <el-row> |
| | | <el-row :gutter="5"> |
| | | <el-col :span="21"> |
| | | <el-input v-model="search" suffix-icon="el-icon-search" placeholder="请输入搜索内容" size="small" clearable></el-input> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-button size="mini" icon="el-icon-plus" @click="bomLeftAdd=true"></el-button> |
| | | <el-button size="small" icon="el-icon-plus" @click="bomLeftAdd=true"></el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-tree style="width: ;" :data="list" ref="tree" default-expand-all :props="{ children: 'children', label: 'name' }" |
| | | <el-tree :data="list" ref="tree" default-expand-all :props="{ children: 'children', label: 'name' }" |
| | | node-key="id" :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current> |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <span><i :class="`node_i ${data.code != '[5]' ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i> |
| | |
| | | <div class="contentTable" v-if="this.typeselect == 0"> |
| | | <technology @childData="getChildData" :tableType="tableType" :tableData="tableData"></technology> |
| | | </div> |
| | | <div v-if="this.typeselect == 1"> |
| | | <div class="contentTable" v-if="this.typeselect == 1"> |
| | | <target @childData="getChildData" :tableType="tableType" :tableData="tableData"></target> |
| | | </div> |
| | | <div v-if="this.typeselect == 2"> |
| | | <div class="contentTable" v-if="this.typeselect == 2"> |
| | | <material @childData="getChildData" :tableType="tableType" :tableData="tableData"></material> |
| | | </div> |
| | | <div v-if="this.typeselect == 3"> |
| | | <div class="contentTable" v-if="this.typeselect == 3"> |
| | | <product @childData="getChildData" :tableType="tableType" :tableData="tableData"></product> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | <div class="bom-add-model"> |
| | | <el-dialog title="BOM新增" :visible.sync="bomAddModelVisible" width="45%"> |
| | | <!-- 工艺路线 --> |
| | | <div v-if="typeselect == 0"> |
| | | <!-- 工艺路线 --> |
| | | <el-dialog title="BOM新增" :visible.sync="technologyVisible" width="45%"> |
| | | <el-form :model="technologyForm" :inline="true" label-position="right" |
| | | ref="technologyForm" :rules="technologyRules" label-width="90px"> |
| | | <el-form-item label="工序:" prop="tefather"> |
| | | <el-select id="tefather" size="small" |
| | | filterable allow-create default-first-option |
| | | v-model="technologyForm.tefather" placeholder="请输入或选择工序"> |
| | | <el-option :value="item.father" :label="item.father" v-for="(item,index) in fatherList" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="工艺名称:" prop="tename"> |
| | | <el-input id="tename" size="small" placeholder="请输入工艺名称" |
| | | clearable v-model="technologyForm.tename"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="设备组:" prop="deviceGroup"> |
| | | <el-select id="deviceGroup" placeholder="请选择设备组" size="small" |
| | | v-model="technologyForm.deviceGroup"> |
| | | <el-option :value="item.father" |
| | | v-for="(item,index) in deviceList" :key="index" :label="item.father"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="生产定额:" prop="productionQuota"> |
| | | <el-input id="productionQuota" size="small" clearable v-model.number="technologyForm.productionQuota" placeholder="请输入生产定额" /> |
| | | </el-form-item> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="工序:" prop="tefather"> |
| | | <el-select size="small" |
| | | filterable allow-create default-first-option |
| | | v-model="technologyForm.tefather" placeholder="请输入或选择工序"> |
| | | <el-option :value="item.father" :label="item.father" v-for="(item,index) in fatherList" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="工艺名称:" prop="tename"> |
| | | <el-input size="small" placeholder="请输入工艺名称" |
| | | clearable v-model="technologyForm.tename"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设备组:" prop="deviceGroup"> |
| | | <el-select placeholder="请选择设备组" size="small" |
| | | v-model="technologyForm.deviceGroup"> |
| | | <el-option :value="item.father" |
| | | v-for="(item,index) in deviceList" :key="index" :label="item.father"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="生产定额:" prop="productionQuota"> |
| | | <el-input size="small" clearable v-model.number="technologyForm.productionQuota" placeholder="请输入生产定额" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <div style="width:100%;text-align: right;"> |
| | | <span slot="footer" class="dialog-footer" > |
| | | <el-button type="primary" @click="confirmAdd('technologyForm')">确 定</el-button> |
| | | <el-button @click="bomAddModelVisible = false">取 消</el-button> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer" > |
| | | <el-button type="primary" @click="confirmAdd('technologyForm')">确 定</el-button> |
| | | <el-button @click="technologyVisible = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 技术指标 --> |
| | | <div v-if="typeselect == 1"> |
| | | <el-dialog title="BOM新增" :visible.sync="targetVisible" width="45%"> |
| | | <el-form :model="targetForm" :inline="true" label-position="right" |
| | | :rules="targetRules" ref="targetForm" label-width="90px"> |
| | | <el-form-item label="工序:" prop="pfather"> |
| | | <el-select v-model="targetForm.pfather" |
| | | @change="changeFather" |
| | | style="width:200px;" placeholder="请选择工序"> |
| | | <el-option :value="item.name" :label="item.name" v-for="(item,index) in targetFormList" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="工艺名称:" prop="technologyId"> |
| | | <el-select v-model="targetForm.technologyId" |
| | | @change="changeTechnologyId" |
| | | style="width:200px;" placeholder="请选择工艺名称"> |
| | | <el-option :value="item.id" :label="item.name" v-for="(item,index) in technologyIdList" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="项目:" prop="father"> |
| | | <el-select v-model="targetForm.father" |
| | | filterable allow-create default-first-option |
| | | style="width:200px;" placeholder="请输入或选择项目"> |
| | | <el-option :value="item.father" :label="item.father" v-for="(item,index) in projectList" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="指标名称:" prop="name"> |
| | | <el-input style="width:200px;" v-model="targetForm.name" placeholder="请输入指标名称"/> |
| | | </el-form-item> |
| | | <el-form-item label="单位:" prop="unit"> |
| | | <el-input style="width:200px;" v-model="targetForm.unit" placeholder="请输入单位"/> |
| | | </el-form-item> |
| | | <el-form-item label="内控值:" prop="internal"> |
| | | <el-input style="width:200px;" v-model="targetForm.internal" placeholder="请输入内控值"/> |
| | | </el-form-item> |
| | | <el-form-item label="标准值:" prop="required"> |
| | | <el-input style="width:200px;" v-model="targetForm.required" placeholder="请输入标准值"/> |
| | | </el-form-item> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="工序:" prop="pfather"> |
| | | <el-select v-model="targetForm.pfather" |
| | | @change="changeFather" size="small" placeholder="请选择工序"> |
| | | <el-option :value="item.name" :label="item.name" v-for="(item,index) in targetFormList" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="工艺名称:" prop="technologyId"> |
| | | <el-select v-model="targetForm.technologyId" |
| | | @change="changeTechnologyId" size="small" placeholder="请选择工艺名称"> |
| | | <el-option :value="item.id" :label="item.name" v-for="(item,index) in technologyIdList" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项目:" prop="father"> |
| | | <el-select v-model="targetForm.father" |
| | | filterable allow-create default-first-option |
| | | size="small" placeholder="请输入或选择项目"> |
| | | <el-option :value="item.father" :label="item.father" v-for="(item,index) in projectList" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="指标名称:" prop="name"> |
| | | <el-input size="small" v-model="targetForm.name" placeholder="请输入指标名称"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="单位:" prop="unit"> |
| | | <el-input size="small" v-model="targetForm.unit" placeholder="请输入单位"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="内控值:" prop="internal"> |
| | | <el-input size="small" v-model="targetForm.internal" placeholder="请输入内控值"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="标准值:" prop="required"> |
| | | <el-input size="small" v-model="targetForm.required" placeholder="请输入标准值"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"></el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <div style="width:100%;text-align: right;"> |
| | | <span slot="footer" class="dialog-footer" > |
| | | <el-button type="primary" @click="confirmAdd('targetForm')">确 定</el-button> |
| | | <el-button @click="bomAddModelVisible = false">取 消</el-button> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer" > |
| | | <el-button type="primary" @click="confirmAdd('targetForm')">确 定</el-button> |
| | | <el-button @click="targetVisible = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 物料清单 --> |
| | | <div v-if="typeselect == 2"> |
| | | <el-dialog title="BOM新增" :visible.sync="materialVisible" width="45%"> |
| | | <el-form :model="materialForm" label-position="right" |
| | | :rules="materialRules" ref="materialForm" label-width="90px"> |
| | | <el-row :gutter="100"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="工序:" prop="mfather"> |
| | | <el-select placeholder="请选择工序" @change="changeMName" |
| | | style="width:100%;" v-model="materialForm.mfather"> |
| | | style="width:100%;" v-model="materialForm.mfather" size="small"> |
| | | <el-option v-for="(item,index) in materialFormList" :key="index" |
| | | :label="item.name" :value="item.name" ></el-option> |
| | | </el-select> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="工艺名称:" prop="mtechnologyId"> |
| | | <el-select placeholder="请选择工艺名称" style="width:100%;" |
| | | v-model="materialForm.mtechnologyId"> |
| | | v-model="materialForm.mtechnologyId" size="small"> |
| | | <el-option v-for="(item,index) in mIdList" :key="index" |
| | | :value="item.id" :label="item.name"></el-option> |
| | | </el-select> |
| | |
| | | <el-form-item label="材料信息" style="font-weight: bold;"></el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="mini" @click="addRowByMaterial">添加行</el-button> |
| | | <el-button size="small" @click="addRowByMaterial">添加行</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-table :data="materialForm.tableList" border max-height="470" |
| | | style="width:100%;text-align: left;margin: 0;padding: 0;" |
| | | :cell-style="{height:'20px',textAlign:'left'}" |
| | | :header-cell-style="{height:'20px'}"> |
| | | <el-table-column label="供应商名称"> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <div style="width:100%;margin-top: 20px;margin-left:75%"> |
| | | <span slot="footer" class="dialog-footer" > |
| | | <el-button type="primary" @click="confirmAdd('materialForm')">确 定</el-button> |
| | | <el-button @click="bomAddModelVisible = false">取 消</el-button> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer" > |
| | | <el-button type="primary" @click="confirmAdd('materialForm')">确 定</el-button> |
| | | <el-button @click="materialVisible = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 生产工艺 --> |
| | | <div v-if="typeselect == 3"> |
| | | <el-dialog title="BOM新增" :visible.sync="productVisible" width="45%"> |
| | | <el-form :model="productForm" :inline="true" label-position="right" |
| | | :rules="productRules" ref="productForm" label-width="90px"> |
| | | <el-form-item label="工序:" prop="profather"> |
| | | <el-select v-model="productForm.profather" |
| | | style="width:200px;" @change="changeProduct" |
| | | placeholder="请选择工序"> |
| | | <el-option v-for="(item,index) in productFormList" :key="index" |
| | | :value="item.name" :label="item.name"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="工艺名称:" prop="protechnologyId"> |
| | | <el-select placeholder="请选择工艺名称" |
| | | style="width:200px;" @change="getProductDeviceList" |
| | | v-model="productForm.protechnologyId"> |
| | | <el-option v-for="(item,index) in proIdList" :key="index" |
| | | :value="item.id" :label="item.name"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="设备:" prop="device"> |
| | | <el-select placeholder="请选择设备" |
| | | style="width:200px;" |
| | | v-model="productForm.device"> |
| | | <el-option v-for="(item,index) in productDeviceList" :key="index" |
| | | :value="item.device" :label="item.device"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="项目:" prop="productFather"> |
| | | <el-select placeholder="请选择项目" |
| | | style="width:200px;" @change="changeProductFather" |
| | | v-model="productForm.productFather"> |
| | | <el-option v-for="(item,index) in productProjectList" :key="index" |
| | | :value="item.name" :label="item.name"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="指标:" prop="product"> |
| | | <el-select placeholder="请选择指标" |
| | | style="width:200px;" @change="changeProProduct" |
| | | v-model="productForm.product"> |
| | | <el-option v-for="(item,index) in proProductList" :key="index" |
| | | :value="item.name" :label="item.name"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="单位:" prop="unit"> |
| | | <el-input style="width:200px;" disabled v-model="productForm.unit"/> |
| | | </el-form-item> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="工序:" prop="profather"> |
| | | <el-select v-model="productForm.profather" |
| | | @change="changeProduct" placeholder="请选择工序" size="small"> |
| | | <el-option v-for="(item,index) in productFormList" :key="index" |
| | | :value="item.name" :label="item.name"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="工艺名称:" prop="protechnologyId"> |
| | | <el-select placeholder="请选择工艺名称" @change="getProductDeviceList" |
| | | v-model="productForm.protechnologyId" size="small"> |
| | | <el-option v-for="(item,index) in proIdList" :key="index" |
| | | :value="item.id" :label="item.name"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="设备:" prop="device"> |
| | | <el-select placeholder="请选择设备" size="small" |
| | | v-model="productForm.device"> |
| | | <el-option v-for="(item,index) in productDeviceList" :key="index" |
| | | :value="item.device" :label="item.device"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项目:" prop="productFather"> |
| | | <el-select placeholder="请选择项目" size="small" @change="changeProductFather" |
| | | v-model="productForm.productFather"> |
| | | <el-option v-for="(item,index) in productProjectList" :key="index" |
| | | :value="item.name" :label="item.name"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="指标:" prop="product"> |
| | | <el-select placeholder="请选择指标" size="small" @change="changeProProduct" |
| | | v-model="productForm.product"> |
| | | <el-option v-for="(item,index) in proProductList" :key="index" |
| | | :value="item.name" :label="item.name"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="单位:" prop="unit"> |
| | | <el-input style="width:100%" size="small" disabled v-model="productForm.unit"/> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <div style="width:100%;text-align: right;"> |
| | | <span slot="footer" class="dialog-footer" > |
| | | <el-button type="primary" @click="confirmAdd('productForm')">确 定</el-button> |
| | | <el-button @click="bomAddModelVisible = false">取 消</el-button> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer" > |
| | | <el-button type="primary" @click="confirmAdd('productForm')">确 定</el-button> |
| | | <el-button @click="productVisible = false">取 消</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- 左侧点击+按钮 --> |
| | | <el-dialog title="BOM新增" :visible.sync="bomLeftAdd" width="29%"> |
| | | <el-form ref="leftAdd" :model="leftAdd"> |
| | |
| | | //子组件传的id列表 |
| | | childIds:[], |
| | | //工序列表 |
| | | technologyIdList:[], |
| | | fatherList:[], |
| | | deviceList:[], |
| | | technologyForm:{ |
| | |
| | | }, |
| | | //技术指标 |
| | | targetFormList:[], |
| | | technologyIdList:[], |
| | | projectList:[], |
| | | targetForm:{ |
| | | pfather:'', |
| | |
| | | searchName: "",// 查询条件-名称 |
| | | checkTreeNode: {},// 点击选中树节点 |
| | | tableData: [], |
| | | bomAddModelVisible: false,// 控制bom新增模态框是否显示 |
| | | technologyVisible: false,// 控制工艺路线新增模态框是否显示 |
| | | targetVisible: false,// 控制技术指标新增模态框是否显示 |
| | | materialVisible: false,// 控制物料清单新增模态框是否显示 |
| | | productVisible: false,// 控制生产工艺新增模态框是否显示 |
| | | bomLeftAdd: false, |
| | | bomRightUp: false, |
| | | bomRightDl: false, |
| | |
| | | }).catch(error=>{ |
| | | this.$message.error(error.message); |
| | | }) |
| | | this.bomAddModelVisible = false; |
| | | this.technologyVisible = false; |
| | | this.targetVisible = false; |
| | | this.materialVisible = false; |
| | | this.productVisible = false; |
| | | }, |
| | | clearBomAddModel(){ |
| | | if(this.typeselect == 0){ |
| | | this.deviceList=[]; |
| | | this.$refs["technologyForm"].resetFields(); |
| | | }else if(this.typeselect == 1){ |
| | | this.technologyIdList = []; |
| | | this.projectList = []; |
| | | this.$refs["targetForm"].resetFields(); |
| | | }else if(this.typeselect == 2){ |
| | | this.mIdList = []; |
| | | this.$refs["materialForm"].resetFields(); |
| | | }else{ |
| | | this.productDeviceList=[]; |
| | | this.proIdList=[]; |
| | | this.productProjectList=[]; |
| | | this.proProductList=[]; |
| | | this.$refs["productForm"].resetFields(); |
| | | } |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | showBomAddModel(){ |
| | | this.getFatherList(); |
| | | this.getDeviceList(); |
| | | this.getTargetFormList(); |
| | | this.getMaterialFormList(); |
| | | this.getProductFormList(); |
| | | this.bomAddModelVisible = true |
| | | if(this.typeselect == 0){ |
| | | this.getFatherList(); |
| | | this.getDeviceList(); |
| | | this.technologyVisible = true |
| | | }else if(this.typeselect == 1){ |
| | | this.getTargetFormList(); |
| | | this.targetVisible = true |
| | | }else if(this.typeselect == 2){ |
| | | this.getMaterialFormList(); |
| | | this.materialVisible = true |
| | | }else{ |
| | | this.getProductFormList(); |
| | | this.productVisible = true |
| | | } |
| | | }, |
| | | startLeftAdd(){ |
| | | |
| | |
| | | }, |
| | | handleNodeClick(val) {//树的值 |
| | | if(val.code==='[5]'&&val.children===undefined){ |
| | | console.log(val); |
| | | this.returntree = val |
| | | this.typeselect=0 |
| | | this.selectVersion() |
| | | } |
| | | }, |
| | |
| | | let arr = res.data; |
| | | this.formatData(arr) |
| | | this.tableData = arr; |
| | | console.log("arr--",arr); |
| | | }) |
| | | }, |
| | | formatData(data){ |
| | | let arr = data; |
| | | for(var i=0;i<arr.length;i++){ |
| | | arr[i].rowId = Math.random(); |
| | | arr[i].indents = 1; |
| | | if(arr[i].children != undefined){ |
| | | this.formatData(arr[i].children); |
| | | } |
| | |
| | | }, |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.label.indexOf(value) !== -1; |
| | | return data.name.indexOf(value) !== -1; |
| | | }, |
| | | remove(node, data) { |
| | | this.$confirm("是否删除", "警告", { |
| | | this.$confirm("是否删除", "提示", { |
| | | type: "warning" |
| | | }).then(res => { |
| | | const parent = node.parent; |
| | |
| | | } |
| | | }, |
| | | watch:{ |
| | | search(val) { |
| | | this.$refs.tree.filter(val); |
| | | }, |
| | | leftAdd: { |
| | | handler(newVal, oldVal) { |
| | | if(this.isLeftAdd){ |
| | |
| | | } |
| | | }, |
| | | deep: true // 深度监听对象内部属性的变化,可选的 |
| | | }, |
| | | bomLeftAdd:{ |
| | | handler(newval,oldVal){ |
| | | if(newval){ |
| | | let treeOptions = JSON.parse(JSON.stringify(this.list)); |
| | | this.replaceProp(treeOptions) |
| | | this.formTypeOptions=treeOptions |
| | | this.restaurants=this.loadFatherType() |
| | | }, |
| | | bomLeftAdd:{ |
| | | handler(newval,oldVal){ |
| | | if(newval){ |
| | | let treeOptions = JSON.parse(JSON.stringify(this.list)); |
| | | this.replaceProp(treeOptions) |
| | | this.formTypeOptions=treeOptions |
| | | this.restaurants=this.loadFatherType() |
| | | } |
| | | } |
| | | }, |
| | | technologyVisible(newVal){ |
| | | if(!newVal){ |
| | | this.clearBomAddModel(); |
| | | } |
| | | }, |
| | | targetVisible(newVal){ |
| | | if(!newVal){ |
| | | this.clearBomAddModel(); |
| | | } |
| | | }, |
| | | materialVisible(newVal){ |
| | | if(!newVal){ |
| | | this.clearBomAddModel(); |
| | | } |
| | | }, |
| | | productVisible(newVal){ |
| | | if(!newVal){ |
| | | this.clearBomAddModel(); |
| | | } |
| | | } |
| | | }, |
| | | bomAddModelVisible(newVal){ |
| | | if(!newVal){ |
| | | this.clearBomAddModel(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | |
| | | <style scoped> |
| | | |
| | | .standard .bom-add-model{ |
| | | width: 100%; |
| | | } |
| | | |
| | | .standard .bom-add-model form{ |
| | | width: 90%; |
| | | margin-left: 5%; |
| | | } |
| | | |
| | | .standard .title .el-button { |
| | | height: 32px; |
| | |
| | | padding: 0 12px; |
| | | } |
| | | |
| | | .standard .right .contentTable{ |
| | | width:98%; |
| | | margin-left:1%; |
| | | } |
| | | |
| | | .standard .title { |
| | | margin-bottom: 10px; |
| | | padding: 0 20px; |