王震
2023-11-06 6afada5b2288dcad1edb2b7d6d05c6fac1195f8e
src/views/quality/processconfiguration/index.vue
@@ -3,6 +3,8 @@
    <basic-container>
      <ttable
        :table="table"
        :resultData="resultData"
        @change ="costPlannedAmountChange"
        @handleSelectionChange="handleSelectionChange"
        :uploadInfo="uploadInfo"
        :isShowHide="true"
@@ -42,19 +44,28 @@
                      <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 ===  '过程检验'">
                    <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-row>
                          <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>
                          <div style="padding: 20px;">
                          <el-radio label="返工">返工</el-radio>
                          <el-radio label="降为他用">降为他用</el-radio>
                          </div>
                    </el-row>
                    </el-radio-group>
                </div>
            </el-form>
            <span slot="footer" >
                <el-button @click="dialogVisible = false">取 消</el-button>
                <el-button @click="WayCancel()">取 消</el-button>
                <el-button type="primary" @click="WaySure()">确 定</el-button>
            </span>
        </el-dialog>
@@ -63,20 +74,21 @@
</template>
<script>
import { UnqualifiedList,pullInsUnapi,AuditSuggestion
} from '@/api/quality/unqualifiedprocess'
import { UnqualifiedList,pullInsUnapi,AuditSuggestion,UnqualifiedDisposal} from '@/api/quality/unqualifiedprocess'
import TableForm from './table-form'
import { mapGetters } from 'vuex'
// import { remote } from '@/api/admin/dict'
import { transform } from '@/util/fileTransform'
import ttable from '@/views/common/ztt-table.vue'
export default {
  data() {
    return {
      resultData:[],
      checkList: "",
      // WayIdea:'',
      UserId:{},
      type:'',
      ajaxFun: UnqualifiedList,
      ajaxFun: UnqualifiedList,pullInsUnapi,AuditSuggestion,
      addOrUpdateVisible: false,
      multipleSelection: [],
      typeOptions: [],
@@ -247,43 +259,13 @@
          //     return this.processModeOptions
          //   }
          // },
          //发起人
            // {
            //   minWidth: '200',
            //   prop: 'originator',
            //   label: '发起人',
            //   sort: true,
            //   isTrue: true,
            //   isSearch: true,
            //   searchInfoType: 'text'
            // },
          // 审核人
          // {
          //   minWidth: '140',
          //   prop: 'examiner',
          //   label: '审核人',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // 处理人
          // {
          //   minWidth: '120',
          //   prop: 'handler',
          //   label: '处理人',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
        
        ],
        toolbar: [
          {
            text: '导出',
            type: 'primary',
            // fun: this.addOrUpdateHandle
            fun: this.exportExcel
          },
        ],
        operator: [
@@ -324,31 +306,38 @@
  },
  computed: {
    ...mapGetters(['permissions'])
  },
  created() {
    // this.getType()
  },
  methods: {
    exportExcel(){
                let queryParam=this.$refs.processconfiguration.getQueryParam();
                delete queryParam.criteria
                console.log(queryParam);
                UnqualifiedDisposal(queryParam).then((res)=>{
                    transform(res)
                })
            },
    //审核结果
    AuditResult(row){
      console.log(row);
      this.UserId = row.id
      this.type = row.type
      this.dialogVisible = true;
      console.log(row.type);
      // setTimeout(() => {
         //       if (this.type === 原材料检验) {
         //          return
         //       } else
      //     if (this.type === 产品检验) {
         //       }
         //    }, 100)
    },
    WayCancel(){
      this.dialogVisible = false
      this.checkList = null
      this.WayIdea = null
    },
    WaySure(){
      AuditSuggestion({id:this.UserId,way:this.checkList}).then(
        res =>{
          this.checkList = null
          this.WayIdea = null
          this.$refs.processconfiguration.refreshData()
          ;})
      this.dialogVisible = false
    },
@@ -357,6 +346,7 @@
      console.log(row.id);
       pullInsUnapi({id:row.id}).then(res =>{
        console.log(res);
        this.$refs.processconfiguration.refreshData()
       })
    },
   
@@ -382,23 +372,9 @@
            return "<span style='color:#34BD66;'></span>"
        }
    }, 
    // materialTypeList(row, column, cellValue){
    //         if(cellValue != undefined || cellValue != null){
    //             if(cellValue == 原材料检验){
    //                 return "<span style='color:#E84738;'>原材料检验</span>"
    //             }
    //             if(cellValue == 过程检验){
    //               return "<span style='color:#34BD66;'>过程检验</span>"
    //             }
    //             if(cellValue == 质量检验){
    //               return "<span style='color:#34BD66;'>质量检验</span>"
    //             }
    //         }
    //     },
    // 获取数据列表
    getData() {
      this.$refs.processconfiguration.getDataList()
      // this.$refs.processconfiguration.getDataList()
    },
    handleSelectionChange(val) {
      // 多行选中