王震
2023-12-19 2fa578a18ed9055f8cb9863a8a0f02977cfa8350
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
@@ -93,7 +98,8 @@
        multiSelect: true, //
        seqNo: true,
        isShowHide: true, // 是否显示显影按钮
        isSearch: false, // 高级查询按钮
        isSearch: false, // 高级查询按钮,
        isRefresh: true, // 是否显示刷新按钮
        defaultOrderBy: { column: 'id', direction: 'desc' }
      },
      table: {
@@ -169,7 +175,7 @@
          {
            minWidth: '120',
            prop: 'sunit',
            label: '单位2',
            label: '重量单位',
            sort: true,
            isTrue: true,
            isSearch: true,
@@ -190,7 +196,7 @@
            searchInfoType: 'text'
          },
          // 一级分类
          {
           {
            minWidth: '120',
            prop: 'assortment',
            label: '一级分类',
@@ -227,7 +233,7 @@
            optList: () => {
              return this.getThreeLevelClassification()
            }
          },
          },
          // 规格
          {
            minWidth: '140',
@@ -239,7 +245,7 @@
            searchInfoType: 'text'
          },
          // 型号
          {
          /* {
            minWidth: '140',
            prop: 'partModel',
            label: '型号',
@@ -301,7 +307,7 @@
            optList: () => {
              return this.lotTrackingIfsOptions
            }
          },
          }, */
          // 版本号
          {
            minWidth: '140',
@@ -311,7 +317,7 @@
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          }/* ,
          // 计划方法
          {
            minWidth: '140',
@@ -325,9 +331,9 @@
            optList: () => {
              return this.planningMethodOptions
            }
          },
          }, */
          // 图号
          {
         /*  {
            minWidth: '140',
            prop: 'drawingNumber',
            label: '图号',
@@ -355,9 +361,9 @@
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          }, */
          // 检验员
          {
          /* {
            minWidth: '140',
            prop: 'examiner',
            label: '检验员',
@@ -388,20 +394,9 @@
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          }
          } */
        ],
        toolbar: [
          {
            text: '新增',
            type: 'primary',
            fun: this.addOrUpdateHandle
          },
          {
            text: '同步MDM',
            type: 'primary',
            fun: () => (this.syncDateVisible = true),
            loading: false
          }
          // {
          //   text: '大标签',
          //   type: 'primary',
@@ -446,16 +441,19 @@
    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.getUnitType('unit')
    this.getMaterialType('material_type')
    this.getCategoryType('category')
    this.getAssortmentType('assortment')
    this.getPlanningMethodType('planning_method_type')
    this.getThreeLevelClassificationType('three_classification_type')
    this.getMaterialAttributeType()
    this.getExaminerDict('examiner_type')
  },
  mounted(){
    this.getUnitType('unit')
    this.getMaterialType('material_type')
    this.getMaterialAttributeType()
  },
  computed: {
    ...mapGetters(['permissions'])
@@ -467,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)
@@ -474,6 +476,10 @@
    },
    // 删除
    deleteHandle(row) {
      if(!this.permissions.basic_part_del){
        this.$message.error("该角色没有操作权限")
        return
      }
      this.$confirm('是否确认零件名为:' + row.partName, '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',