zouyu
2023-12-25 1dc18db8439ce29fee28edf6627aaadc8726c49c
src/views/technology/routing/index.vue
@@ -16,13 +16,13 @@
          <el-button v-if="permissions.technology_routing_add"
          type="primary" @click="addOrUpdateHandle">新增</el-button>
          <el-button @click="() => {this.approveHandle('ACCEPT')}" 
          :disabled="uniqueStateArr.includes('01draft')"
          :disabled="!uniqueStateArr.includes('01draft')"
          v-if="permissions.technology_routing_accept">批准</el-button>
          <el-button @click="() => {this.approveHandle('REVOKE')}" 
          :disabled="uniqueStateArr.includes('02accepted')"
          :disabled="!uniqueStateArr.includes('02accepted')"
          v-if="permissions.technology_routing_revoke">撤回</el-button>
          <el-button @click="() => {this.approveHandle('CANCEL')}"
          :disabled="uniqueStateArr.includes('02accepted')"
          :disabled="!uniqueStateArr.includes('02accepted')"
          v-if="permissions.technology_routing_cancel">拒绝</el-button>
          <el-button @click="copyRouting"
          v-if="permissions.technology_routing_cancel">复制</el-button>
@@ -358,18 +358,7 @@
          }
        ],
        toolbar: [],
        operator: [
          {
            text: '删除',
            type: 'text',
            size: 'small',
            fun: this.deleteHandle
            // show: {
            //   val: ['01draft'],
            //   key: 'state'
            // }
          }
        ],
        operator: null,
        operatorConfig: {
          fixed: 'right',
          label: '操作',
@@ -446,6 +435,20 @@
    this.getData()
  },
  created() {
    if(this.permissions.technology_routing_del){
      this.table.operator = [
          {
            text: '删除',
            type: 'text',
            size: 'small',
            fun: this.deleteHandle
            // show: {
            //   val: ['01draft'],
            //   key: 'state'
            // }
          }
        ]
    }
    this.getBomTypeDbOptions()
  },
  methods: {
@@ -474,10 +477,6 @@
    },
    // 删除
    deleteHandle(row) {
      if(!this.permissions.technology_routing_del){
        this.$message.error("该角色没有操作权限")
        return
      }
      this.$confirm('是否确认删除工艺编号:' + row.routingNo + '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',