zouyu
2023-12-19 c807040fe243a4e36aa73dd8962791d6ee4ff7f0
src/views/technology/operation/index.vue
@@ -10,7 +10,10 @@
        :ajaxFun="ajaxFun"
        ref="operationTable"
      >
        <template #toolbar></template>
        <template #toolbar>
          <el-button type="primary" @click="addOrUpdateHandle"
          v-if="permissions.technology_operation_add">新增</el-button>
        </template>
      </ttable>
      <!-- 弹窗, 新增 / 修改 -->
      <table-form
@@ -35,7 +38,7 @@
      multipleSelection: [],
      uploadInfo: {
        // 是否展示上传EXCEL以及对应的url
        isShow: true,
        isShow: false,
        url: '/mes/operation/excel/upload'
      },
      prelang: 'operation',
@@ -85,15 +88,15 @@
            searchInfoType: 'text'
          },
          // 零件族
          {
            minWidth: '120',
            prop: 'partFamilyName',
            label: '零件族',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          // {
          //   minWidth: '120',
          //   prop: 'partFamilyName',
          //   label: '零件族',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // 工作中心
          {
            minWidth: '120',
@@ -109,25 +112,25 @@
            }
          },
          // 机器运转因素
          {
            minWidth: '120',
            prop: 'machRunFactor',
            label: '机器运转因素',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          // {
          //   minWidth: '120',
          //   prop: 'machRunFactor',
          //   label: '机器运转因素',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // 机器设置时间
          {
            minWidth: '120',
            prop: 'machSetupTime',
            label: '机器设置时间',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          // {
          //   minWidth: '120',
          //   prop: 'machSetupTime',
          //   label: '机器设置时间',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // 人工类别
          {
            minWidth: '120',
@@ -143,62 +146,62 @@
            }
          },
          // 劳力运转因素
          {
            minWidth: '120',
            prop: 'laborRunFactor',
            label: '劳力运转因素',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          // {
          //   minWidth: '120',
          //   prop: 'laborRunFactor',
          //   label: '劳力运转因素',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // 劳力设置时间
          {
            minWidth: '120',
            prop: 'laborSetupTime',
            label: '劳力设置时间',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          // {
          //   minWidth: '120',
          //   prop: 'laborSetupTime',
          //   label: '劳力设置时间',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // 因素单位
          {
            minWidth: '120',
            prop: 'runTimeCodeDb',
            label: '因素单位',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'select',
            formatter: this.formatRunTimeCodeDbType,
            optList: () => {
              return this.runTimeCodeDbTypeOptions
            }
          },
          // {
          //   minWidth: '120',
          //   prop: 'runTimeCodeDb',
          //   label: '因素单位',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'select',
          //   formatter: this.formatRunTimeCodeDbType,
          //   optList: () => {
          //     return this.runTimeCodeDbTypeOptions
          //   }
          // },
          // 班组人员
          {
            minWidth: '120',
            prop: 'crewSize',
            label: '班组人员',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '120',
            prop: 'outsideOpItem',
            label: '外部工序项目',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'select',
            formatter: this.formatOutsideOpItem,
            optList: () => {
              return this.outsideOpItemOptions
            }
          },
          // {
          //   minWidth: '120',
          //   prop: 'crewSize',
          //   label: '班组人员',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // {
          //   minWidth: '120',
          //   prop: 'outsideOpItem',
          //   label: '外部工序项目',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'select',
          //   formatter: this.formatOutsideOpItem,
          //   optList: () => {
          //     return this.outsideOpItemOptions
          //   }
          // },
          // 备注
          {
            minWidth: '120',
@@ -220,13 +223,7 @@
            searchInfoType: 'datetimerange'
          }
        ],
        toolbar: [
          {
            text: '新增',
            type: 'primary',
            fun: this.addOrUpdateHandle
          }
        ],
        toolbar: [],
        operator: [
          {
            text: '删除',
@@ -271,6 +268,10 @@
    },
    // 新增 / 修改
    addOrUpdateHandle(row) {
      if(!this.permissions.technology_operation_edit && row.id!=null){
        this.$message.error("该角色没有操作权限")
        return
      }
      this.$router.push({
        name: 'operationForm',
        params: { id: row == null ? null : row.id }
@@ -278,6 +279,10 @@
    },
    // 删除
    deleteHandle(row) {
      if(!this.permissions.technology_operation_del){
        this.$message.error("该角色没有操作权限")
        return
      }
      this.$confirm('是否确认删除编号为' + row.operationNo, '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',