王震
2023-08-26 df5f05fdc4acc8b0258d391a495e544bc0991e64
src/views/experiment/inspectionApplication/index.vue
@@ -393,7 +393,7 @@
                    style="width: 100%; margin-bottom: 20px"
                    row-key="name"
                    border
                    default-expand-all
                    ref="multipleTable"
                    :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
@@ -449,7 +449,7 @@
                <el-button @click="Standardframe = false">取 消</el-button>
                <el-button type="primary" @click="Standardframe = false">确 定</el-button>
            </span>
            </el-dialog>
        <!-- 原材料检验模态框 -->
@@ -470,7 +470,7 @@
            <el-table-column
                type="selection"
                min-width="10%"
              />
              />
              <el-table-column
                type="index"
                label="序号"
@@ -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 !== ''){
@@ -807,40 +797,29 @@
      this.rawmaterialVisible = false
    },
    handleRadioChange(){
      setTimeout(() => {
        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
        })
          // this.infoForm = 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);
          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);
      setTimeout(()=>{
            if(this.type === 0){
              // 原材料报检
              this.rawmaterialVisible = true
              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.rawMaterialTable = res.data
               })
              // this.$router.push({ name: 'ReportForInspection' });
            }else if(this.type === 1){
              this.commisionVisible = true
                  getCnList({pageNo:1,pageSize:10}).then(res=>{
                    // consommisioole.log(res);
                    this.commisionTable = res.data.row
                  })
            }
         },100)
    },
    // 新增检验
    async addInspection(){
@@ -913,7 +892,7 @@
            this.BANben = res.data.row
            console.log(this.BANben);
          })
      },
      handleSelectionChange_0(val){
        this.select_1 = []