王震
2023-08-26 df5f05fdc4acc8b0258d391a495e544bc0991e64
src/views/experiment/inspectionApplication/index.vue
@@ -695,16 +695,7 @@
    },
    methods: {
      async handleClick(row){
        // console.log(item);
        // const res = await ddd({goodId:id})
        // this.$message({
        //   message: '恭喜你,这是一条成功消息',
        //   type: 'success'
        // });
        // console.log(res);
        this.inspectionTable = row;
        console.log(row.id);
        this.id = row.id
        this.$router.push({name:'Viewdetails',query: {id:row.id}});
        this.selectInspectsList()
@@ -723,7 +714,7 @@
      async getCommisionList() {
        const res = await getCommisionList({pageNo:1,pageSize:10 })
        console.log(res);
        this.commisionTable = res.data.row
        this.commisionTable = res.data
      },
      //原材料
      async selecYANcailisotAllAPI() {
@@ -763,7 +754,6 @@
          item['checkdate'] = checkdate // 检验日期
          item['createTime'] = createTime // 登记日期
      })
      console.log('data:',data)
      this.inspectionTable = data
      if(this.searchData.type !== ''){
        if(this.searchData.state !== ''){
@@ -811,36 +801,25 @@
        if(this.type === 0){
        // 原材料报检
        this.rawmaterialVisible = true
        YANcailiso({pageNo:1,pageSize:10}).then(res=>{
        //   var data = res.data
        // data.forEach((item)=>{
        //   var checkdate = []
        //   checkdate.push(item['createTime'])
        //   checkdate.push(item['updateTime'])
        //   item['checkdate'] = checkdate // 检验日期
        // })
        this.rawMaterialTable = res.data.row
              selectAll({type: this.type}).then(res=>{
                  var data = res.data
                  data.forEach((item)=>{
                    var checkdate = []
                    checkdate.push(item['createTime'])
                    checkdate.push(item['updateTime'])
                    item['checkdate'] = checkdate // 检验日期
        })
          // this.infoForm = res.data
                  this.rawMaterialTable = res.data
               })
        // this.$router.push({ name: 'ReportForInspection' });
      }else if(this.type === 1){
        this.commisionVisible = true
        getCommisionList({pageNo:1,pageSize:10}).then(res=>{
          // console.log(res);
                  getCnList({pageNo:1,pageSize:10}).then(res=>{
                    // consommisioole.log(res);
          this.commisionTable = res.data.row
        })
        // var data = res.data
        // data.forEach((item)=>{
        //   var checkdate = []
        //   checkdate.push(item['startTime'])
        //   checkdate.push(item['endTime'])
        //   item['checkdate_'] = item['startTime'] + '~' + item['endTime']
        //   item['checkdate'] = checkdate // 检验日期
        // })
      }
      }, 100);
         },100)
    },
    // 新增检验
    async addInspection(){