| | |
| | | fetchList, |
| | | delObj, |
| | | addByStructure, |
| | | exportBom |
| | | } from '@/api/technology/completeproductstructure' |
| | | import ttable from '@/views/common/ztt-table.vue' |
| | | import { mapGetters } from 'vuex' |
| | | import { changeState } from '../../../api/technology/completeproductstructure' |
| | | import { remote } from '@/api/admin/dict' |
| | | import { transform } from '@/util/fileTransform' |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | permitArr: [], |
| | | fun: ()=>{this.deleteAll()}, |
| | | }) |
| | | } |
| | | } |
| | | this.table.toolbar.push({ |
| | | text: 'BOM导出', |
| | | type:'primary', |
| | | disabled: false, |
| | | permitArr: [], |
| | | fun: ()=>{this.exportBomFun()}, |
| | | }) |
| | | if(this.permissions.technology_completeproductstructure_del){ |
| | | this.table.operator = [ |
| | | { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | exportBomFun(){ |
| | | let ids = this.multipleSelection.map(ele=>ele.id) |
| | | if(ids.length<1){ |
| | | this.$message.error("请选择一条数据") |
| | | return |
| | | } |
| | | exportBom(ids).then(res=>{ |
| | | if(res.status===200){ |
| | | transform(res) |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | getBomTypeDbOptions() { |
| | | remote('bom_type_db').then((response) => { |
| | | if (response.data.code === 0) { |