| | |
| | | ref="structureTable" |
| | | > |
| | | <template #toolbar> |
| | | <!-- <el-button type="primary" :loading="ifsSynsLoading" @click="syncIfs" |
| | | >ERP同步</el-button |
| | | > --> |
| | | <el-button type="primary" @click="addOrUpdateHandle" |
| | | v-if="permissions.technology_structure_add">新增</el-button> |
| | | <el-button type="primary" @click="copyStructure" |
| | | v-if="permissions.technology_structure_copy">复制</el-button> |
| | | </template> |
| | | </ttable> |
| | | <!-- 弹窗, 新增 / 修改 --> |
| | | <!--<table-form v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getData"></table-form>--> |
| | | <el-dialog |
| | | title="导入" |
| | | :visible.sync="importStructureVisible" |
| | |
| | | noShowTip: false |
| | | } |
| | | ], |
| | | toolbar: [ |
| | | { |
| | | text: '新增', |
| | | // icon: 'el-icon-plus', |
| | | type: 'primary', |
| | | fun: this.addOrUpdateHandle, |
| | | disabled: false, |
| | | permitArr: [] |
| | | }, |
| | | { |
| | | text: '复制', |
| | | fun: this.copyStructure, |
| | | disabled: false, |
| | | permitArr: [] |
| | | } |
| | | ], |
| | | toolbar: [], |
| | | operator: [ |
| | | { |
| | | text: '删除', |
| | |
| | | this.getData() |
| | | }, |
| | | created() { |
| | | this.uploadInfo.isShow = this.permissions.technology_structure_upload |
| | | this.table.column.find((e) => e.label === '已同步至ERP').isTrue = false |
| | | this.getBomTypeDbOptions() |
| | | }, |
| | |
| | | }, |
| | | // 新增 / 修改 |
| | | addOrUpdateHandle(row) { |
| | | if(!this.permissions.technology_structure_edit && row.id!=null){ |
| | | this.$message.error("该角色没有操作权限") |
| | | return |
| | | } |
| | | this.$router.push({ |
| | | name: 'singleStructureForm', |
| | | params: { id: row == null ? null : row.id } |
| | | }) |
| | | // this.$router.push({name:"structureForm",query:{id:row==null?null:row.id}}) |
| | | }, |
| | | // 删除 |
| | | deleteHandle(row) { |
| | | if(!this.permissions.technology_structure_del){ |
| | | this.$message.error("该角色没有操作权限") |
| | | return |
| | | } |
| | | this.$confirm('是否确认删除ID为' + row.id, '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |