| | |
| | | ref="documentTable" |
| | | > |
| | | <template #toolbar> |
| | | <el-button type="primary" :loading="ifsSynsLoading" @click="syncIfs" |
| | | >ERP同步</el-button |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | @click="deleteBatch" |
| | | v-if="permissions.technology_document_del" |
| | | >批量删除</el-button |
| | | > |
| | | <el-button |
| | | <!-- <el-button |
| | | type="primary" |
| | | @click="bindTestStandard" |
| | | v-if="permissions.technology_document_standard_upload" |
| | | >批量绑定检测标准</el-button |
| | | > |
| | | > --> |
| | | </template> |
| | | </ttable> |
| | | <el-dialog |
| | |
| | | searchInfoType: 'text' |
| | | }, |
| | | // 绝缘颜色 |
| | | { |
| | | minWidth: '120', |
| | | prop: 'insulationColor', |
| | | label: '绝缘颜色', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | // { |
| | | // minWidth: '120', |
| | | // prop: 'insulationColor', |
| | | // label: '绝缘颜色', |
| | | // sort: true, |
| | | // isTrue: true, |
| | | // isSearch: true, |
| | | // searchInfoType: 'text' |
| | | // }, |
| | | // 护套颜色 |
| | | { |
| | | minWidth: '120', |
| | | prop: 'sheathColor', |
| | | label: '护套颜色', |
| | | sort: true, |
| | | isTrue: true, |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | // { |
| | | // minWidth: '120', |
| | | // prop: 'sheathColor', |
| | | // label: '护套颜色', |
| | | // sort: true, |
| | | // isTrue: true, |
| | | // isSearch: true, |
| | | // searchInfoType: 'text' |
| | | // }, |
| | | { |
| | | minWidth: '120', |
| | | prop: 'testStandard', |
| | |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | { |
| | | /* { |
| | | minWidth: '120', |
| | | prop: 'projectType', |
| | | label: '项目类别', |
| | |
| | | isSearch: true, |
| | | searchInfoType: 'text' |
| | | }, |
| | | |
| | | */ |
| | | // 描述 |
| | | { |
| | | minWidth: '120', |
| | |
| | | searchInfoType: 'datetimerange' |
| | | } |
| | | ], |
| | | toolbar: [ |
| | | { |
| | | text: '新增', |
| | | type: 'primary', |
| | | fun: this.addOrUpdateHandle, |
| | | disabled: false, |
| | | permitArr: [] |
| | | }, |
| | | { |
| | | text: '复制', |
| | | fun: this.copyDocument, |
| | | disabled: false, |
| | | permitArr: [] |
| | | }, |
| | | { |
| | | text: '批准', |
| | | fun: () => { |
| | | this.changeState('accept') |
| | | }, |
| | | disabled: false, |
| | | permitArr: ['01draft', '03accepted', '04reject'] |
| | | }, |
| | | { |
| | | text: '拒绝', |
| | | fun: () => { |
| | | this.changeState('reject') |
| | | }, |
| | | disabled: false, |
| | | permitArr: ['01draft', '03accepted', '04reject'] |
| | | }, |
| | | { |
| | | text: '撤销', |
| | | fun: () => { |
| | | this.changeState('cancel') |
| | | }, |
| | | disabled: false, |
| | | permitArr: ['01draft', '03accepted', '04reject'] |
| | | } |
| | | /*, |
| | | { |
| | | text: '海缆OA', |
| | | fun: () => { |
| | | this.approveHandle(0) |
| | | }, |
| | | disabled: false, |
| | | permitArr: ['01draft', '04reject'], |
| | | loading: false |
| | | }, |
| | | { |
| | | text: '陆缆OA', |
| | | fun: () => { |
| | | this.approveHandle(1) |
| | | }, |
| | | disabled: false, |
| | | permitArr: ['01draft', '04reject'], |
| | | loading: false |
| | | }, |
| | | { |
| | | text: '导出word', |
| | | type: 'primary', |
| | | fun: this.exportWord, |
| | | disabled: false, |
| | | permitArr: [] |
| | | } */ |
| | | ], |
| | | operator: [], |
| | | toolbar: [], |
| | | operator: null, |
| | | operatorConfig: { |
| | | fixed: 'right', |
| | | label: '操作', |
| | |
| | | activated() { |
| | | this.getData() |
| | | }, |
| | | created() { |
| | | this.getBomTypeDbOptions() |
| | | created() { |
| | | if(this.permissions.technology_document_add){ |
| | | this.table.toolbar.push({ |
| | | text: '新增', |
| | | type: 'primary', |
| | | disabled: false, |
| | | fun: ()=>{this.addOrUpdateHandle()}, |
| | | permitArr: [], |
| | | }) |
| | | } |
| | | if(this.permissions.technology_document_accept){ |
| | | this.table.toolbar.push({ |
| | | text: '批准', |
| | | disabled: true, |
| | | fun: ()=>{this.changeState('accept')}, |
| | | permitArr: ['01draft', '03accepted', '04reject'], |
| | | }) |
| | | } |
| | | if(this.permissions.technology_document_reject){ |
| | | this.table.toolbar.push({ |
| | | text: '拒绝', |
| | | disabled: true, |
| | | fun: () => {this.changeState('reject')}, |
| | | permitArr: ['01draft', '03accepted', '04reject'], |
| | | }) |
| | | } |
| | | if(this.permissions.technology_document_cancel){ |
| | | this.table.toolbar.push({ |
| | | text: '撤销', |
| | | disabled: true, |
| | | fun: ()=>{this.changeState('cancel')}, |
| | | permitArr: ['01draft', '03accepted', '04reject'], |
| | | }) |
| | | } |
| | | if (this.permissions.technology_document_del) { |
| | | this.table.operator.push({ |
| | | this.table.toolbar.push({ |
| | | text: '批量删除', |
| | | type: 'primary', |
| | | disabled: false, |
| | | fun: ()=>{this.deleteBatch()}, |
| | | permitArr: [], |
| | | }) |
| | | } |
| | | if (this.permissions.technology_document_del) { |
| | | this.table.operator = [{ |
| | | text: '删除', |
| | | type: 'text', |
| | | size: 'small', |
| | |
| | | val: ['01draft'], |
| | | key: 'state' |
| | | } |
| | | }) |
| | | } else { |
| | | this.table.operator.push({ |
| | | text: '删除', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle, |
| | | show: { |
| | | val: [], |
| | | key: 'state' |
| | | } |
| | | }) |
| | | }] |
| | | } |
| | | this.getBomTypeDbOptions() |
| | | }, |
| | | watch:{ |
| | | multipleSelection(newVal){ |
| | | if(newVal.length==0){ |
| | | this.table.toolbar.forEach(ele=>{ |
| | | if(ele.text=='拒绝' || ele.text=='批准' || ele.text=='撤销'){ |
| | | ele.disabled = true |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | // 新增 / 修改 |
| | | addOrUpdateHandle(row) { |
| | | if(!this.permissions.technology_document_edit && row.id!=null){ |
| | | this.$message.error("该角色没有操作权限") |
| | | return |
| | | } |
| | | this.$router.push({ |
| | | name: 'documentForm', |
| | | query: { id: row == null ? null : row.id } |