王震
2023-11-29 5fdedc928cd6970423cf024c43a99e522a44dbcf
src/views/warehouse/pallettransports/index.vue
@@ -215,6 +215,7 @@
        url: ''
      },
      WorkOrder:{},
      datalistAPI:'',
      prelang: 'pallettransports',
      options: {
        height: 300, // 默认高度-为了表头固定
@@ -572,13 +573,14 @@
              if (resData.code === 0) {
                this.innerVisible = false
                this.$message.success('添加移库明细成功')
                this.MobileLibrary()
                this.$emit('refreshDataList')
              } else {
                this.$message.error('添加移库明细失败')
              }
            })
            .catch(() => {
            })
            // .catch(() => {
            // })
        }
    },
    // 添加ifs物料库存回调
@@ -704,27 +706,26 @@
    },
    palletTransportsMaterialSelectionChange(val) {
      this.palletTransportsMaterialMultipleSelection = val
      let nn =[]
      this.palletTransportsMaterialMultipleSelection.forEach(el =>{nn.push(el.id)})
      let xx = nn[nn.length - 1];
      console.log(xx);
      console.log(this.currPalletTransportsRow.id,"默认");
      let ids =[]
      this.palletTransportsMaterialMultipleSelection.forEach(el =>{ids.push(el.id)})
      let pId = ids[ids.length - 1];
      console.log(pId);
      this.palletTransportsDetailData = []
      if (xx) {
        selectAll({transportsId:this.currPalletTransportsRow.id,transportsMaterialId:xx}).then((res) =>{
        console.log(res.data.data);
        this.palletTransportsDetailData.push(res.data.data)})
      }
      // if (this.palletTransportsMaterialMultipleSelection.length > 0) {
      //   const currPalletTransportsMaterial = this
      //     .palletTransportsMaterialMultipleSelection[
      //     this.palletTransportsMaterialMultipleSelection.length - 1
      //   ]
      //   this.materialRow = currPalletTransportsMaterial
      // } else {
      //   this.materialRow = null
      // }
      // this.getPalletTransportsDetailData()
      this.datalistAPI = pId
      this.MobileLibrary()
    },
    MobileLibrary(){
      if(this.datalistAPI){
        selectAll({
            transportsId:this.currPalletTransportsRow.id,
            transportsMaterialId: this.datalistAPI
          }).then((res) =>{
            console.log(res);
            if(res.data.data){
              this.palletTransportsDetailData.push(res.data.data)
            }
            })
         }
    },
    palletTransportsDetailSelectionChange(val) {
      this.palletTransportsDetailMultipleSelection = val