#
whycq
2022-05-16 1bcfda36d1d4c3141c07342a5bd727b0aefd2f7a
Monitor-APP/pages/index/data.js
@@ -27,4 +27,77 @@
//          {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027507728","count":1.0},
//          {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22027504810","count":1.0},
//          {"matnr":"1100349-10000","maknx":"C5S-4-M03/333/KS","batch":"22037505148","count":1.0}],
//          "emptyMk":false}]}
//          "emptyMk":false}]}
   getEEE() {
      var result = ycqdata.dataEEE
      console.log(result)
      let that = this
      let res = result.data
      console.log(res)
      if (res.data && res.data !== "") {
         console.log('有异常')
         that.title = ''
         that.staNo = ''
         that.pakinShow = false
         that.errorShow = true
         that.errorPaper = res.data
         that.move = false // 显示
      } else {
         that.errorPaper = ''
         that.errorShow = false
         console.log('无异常')
         console.log(that.pakinShow)
         if (that.pakinShow) {
            console.log('无异常,有拣货')
            return;
         } else {
            that.move = true // 隐藏
         }
      }
   },
   getYYY() {
      var result = ycqdata.dataYYY
         console.log(result)
      let that = this
      var newsData = ''
      var str = ''
      let res = result.data
      if(res.data) {
         console.log("拣货,有拣料")
         if (res.data[0].matDtos.length > 0) {
            console.log("有拣料,长度>8")
            that.pakinShow = true
            that.pakinGun = true
            // console.log(that.errorShow,that.pakinShow,that.pakinGun)
            if (res.data[0].ioType === 101) {
               that.title = '全板出库'
            } else if(res.data[0].ioType === 103) {
               that.title = '检料出库'
            }
            that.staNo = '目标站' + res.data[0].staNo
            for (var i = 0; i < res.data[0].matDtos.length; i++) {
               str = res.data[0].matDtos[i].matnr + ' - ' + res.data[0].matDtos[i].batch + '\n'
               newsData = newsData + str
            }
            if (that.errorShow) {
               // that.pakinShow = false
               return;
            } else {
               that.newspaper = newsData
               that.move = false
            }
            if (res.data[0].matDtos.length <= 8) {
               console.log("有拣料,长度<=8")
               that.errorShow = true
               that.pakinShow = true
               that.pakinGun  = false
            }
            console.log(that.errorShow,that.pakinShow,that.pakinGun)
         } else {
            that.move = true
         }
      }
   },