zouyu
2024-02-29 363678a54142e62fdd4ca39a0db5c54af1a704dc
src/views/quality/processconfiguration/index.vue
@@ -41,9 +41,9 @@
                    <el-radio-group v-model="checkList">
                      <el-radio label="返修">返修</el-radio>
                      <el-radio label="接收">接收</el-radio>
                      <el-radio label="降级使用">降级使用</el-radio>
                      <el-radio label="报废">报废</el-radio>
                      <el-radio label="降为他用">降为他用</el-radio>
                      <el-radio label="降级使用">降级使用</el-radio>
                      <el-radio label="报废">报废</el-radio>
                      <el-radio label="降为他用">降为他用</el-radio>
                    </el-radio-group>
                </div>
                <div v-if="type ===  '过程检验'">
@@ -52,12 +52,12 @@
                          <div style="padding: 20px;">
                          <el-radio label="返修">返修</el-radio>
                          <el-radio label="接收">接收</el-radio>
                          <el-radio label="降级使用">降级使用</el-radio>
                          <el-radio label="报废">报废</el-radio>
                          <el-radio label="降级使用">降级使用</el-radio>
                          <el-radio label="报废">报废</el-radio>
                          </div>
                          <div style="padding: 20px;">
                          <el-radio label="返工">返工</el-radio>
                          <el-radio label="降为他用">降为他用</el-radio>
                          <el-radio label="返工">返工</el-radio>
                          <el-radio label="降为他用">降为他用</el-radio>
                          </div>
                    </el-row>
                    </el-radio-group>
@@ -73,7 +73,7 @@
</template>
<script>
import {
import {
  UnqualifiedList,
  pullInsUnapi,
  AuditSuggestion,
@@ -138,6 +138,15 @@
                  return this.materialType
            // render: { fun: this.addOrUpdateHandle }
              }
          },
          // 检验编号
          {
            minWidth: '140',
            prop: 'inspectNo',
            label: '检验编号',
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text',
          },
          // 产品名称
          {
@@ -263,35 +272,16 @@
          //     return this.processModeOptions
          //   }
          // },
        ],
        toolbar: [
          {
            text: '导出',
            type: 'primary',
            fun: this.handleExport
          },
        ],
        operator: [
          // {
          //   text: '删除',
          //   type: 'text',
          //   size: 'small',
          //   fun: this.deleteHandle
          //   text: '导出',
          //   type: 'primary',
          //   fun: this.handleExport
          // },
          {
            text: '提交审核',
            type: 'text',
            size: 'small',
            fun: this.Submitreview
          },
          {
            text: '审核结果',
            type: 'text',
            size: 'small',
            fun: this.AuditResult
          }
        ],
        operator: null,
        operatorConfig: {
          fixed: 'right',
          label: '操作',
@@ -300,7 +290,7 @@
        }
      },
      materialType: [{label:'原材料检验',value:'原材料检验'},{label:'过程检验',value:'过程检验'},{label:'产品检验',value:'产品检验'},{label:'包装检验',value:'包装检验'}],
      StateList: [{label:'全部',value:''},{label:'已提交审核',value:'1'},{label:'待处理',value:'0'},{label:'已处理',value:'2'}],
      StateList: [{label:'全部',value:''},{label:'已提交审核',value:'1'},{label:'待处理',value:'0'},{label:'已完成',value:'2'}],
      insStateList: [{label:'其他',value:''},{label:'瑕疵',value:'1'}],
    }
  },
@@ -314,6 +304,29 @@
  },
  created() {
    // this.getType()
    let arr = []
    if(this.permissions.quality_processconfiguration_submit){
      arr.push({
            text: '提交审核',
            type: 'text',
            size: 'small',
            fun: this.Submitreview,
            show: {
                key: 'state',
                val: [0]
            }
          })
    }
    if(this.permissions.quality_processconfiguration_result){
        arr.push({
            text: '审核结果',
            type: 'text',
            size: 'small',
            fun: this.AuditResult,
            showFun: (row)=>{return row.type != '原材料检验'}
          })
    }
    this.table.operator = arr.length>0 ? arr : null
  },
  methods: {
    getQueryParam(data){
@@ -321,7 +334,6 @@
    },
    handleExport(){
      exportData(this.queryParam).then(res=>{
          console.log(res)
          this.downloadFun(res)
      }).catch(error=>{
          console.log(error);
@@ -367,13 +379,11 @@
    },
    //提交审核
   Submitreview(row){
      console.log(row.id);
       pullInsUnapi({id:row.id}).then(res =>{
        console.log(res);
        this.$refs.processconfiguration.refreshData()
       })
    },
    //状态
    formatInsState(row, column, cellValue){
            if(cellValue != undefined || cellValue != null){
@@ -384,7 +394,7 @@
                  return "<span style='color:#34BD66;'>已提交审核</span>"
                }
                if(cellValue == 2){
                  return "<span style='color:#34BD66;'>已处理</span>"
                  return "<span style='color:#34BD66;'>已完成</span>"
                }
            }
        },
@@ -395,7 +405,7 @@
            }
            return "<span style='color:#34BD66;'></span>"
        }
    },
    },
    // 获取数据列表
    getData() {
      // this.$refs.processconfiguration.getDataList()