zouyu
2023-12-19 795fa953f456ea886be77f8bb345c50a0fbea590
src/views/basic/part/index.vue
@@ -12,7 +12,12 @@
        :ajaxFun="ajaxFun"
        ref="partTable"
      >
        <template #toolbar></template>
        <template #toolbar>
          <el-button type="primary" @click="addOrUpdateHandle"
          v-if="permissions.basic_part_add">新增</el-button>
          <el-button type="primary" @click="() => (this.syncDateVisible = true)"
          v-if="permissions.basic_part_mdm">同步MDM</el-button>
        </template>
      </ttable>
      <!-- 弹窗, 新增 / 修改 -->
      <table-form
@@ -392,17 +397,6 @@
          } */
        ],
        toolbar: [
          {
            text: '新增',
            type: 'primary',
            fun: this.addOrUpdateHandle
          },
          {
            text: '同步MDM',
            type: 'primary',
            fun: () => (this.syncDateVisible = true),
            loading: false
          }
          // {
          //   text: '大标签',
          //   type: 'primary',
@@ -447,6 +441,7 @@
    PrintLabelForm
  },
  created() {
    this.uploadInfo.isShow = this.permissions.basic_part_upload
    this.table.column.find((e) => e.label === 'IFS启用批次管理').isTrue = false
    this.table.column.find((e) => e.label === '计划方法').isTrue = false
    this.getCategoryType('category')
@@ -470,6 +465,10 @@
    },
    // 新增 / 修改
    addOrUpdateHandle(row) {
      if(!this.permissions.basic_part_edit && row.id!=null){
        this.$message.error("该角色没有操作权限")
        return
      }
      this.addOrUpdateVisible = true
      this.$nextTick(() => {
        this.$refs.addOrUpdate.init(row == null ? null : row.id)
@@ -477,6 +476,10 @@
    },
    // 删除
    deleteHandle(row) {
      if(!this.permissions.basic_part_del){
        this.$message.error("该角色没有操作权限")
        return
      }
      this.$confirm('是否确认零件名为:' + row.partName, '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',