zouyu
2023-12-28 f135e67b7a6733796aaa855198a8b97f2894c5c7
	modified:   src/views/warehouse/pallettransports/index.vue
已修改1个文件
28 ■■■■■ 文件已修改
src/views/warehouse/pallettransports/index.vue 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/warehouse/pallettransports/index.vue
@@ -113,7 +113,7 @@
              <!-- <el-button type="warning" v-if="permissions.warehouse_pallettransports_detail_library" round
                @click="openDetailLocationDialog">一键至库位</el-button> -->
              <el-button type="success" v-if="permissions.warehouse_pallettransports_detail_execute" round
                @click="executeMove">执 行</el-button>
                @click="updateStockFun">执 行</el-button>
            </div>
          </div>
          <div>
@@ -758,8 +758,7 @@
      console.log(this.palletTransportsDetailMultipleSelection,"--->123");
     
    },
    // 执行移库
    executeMove() {
    updateStockFun(){
      let data = []
      data = this.palletTransportsDetailMultipleSelection.map(el =>{
          return {
@@ -767,19 +766,15 @@
              transferQuantity:el.transfer_quantity
          }
      })
      console.log(data,"----------++++++++");
        if (data.length>0) {
            // if(data[0].transferQuantity){
              updateStock(data).then((res) =>{
              console.log(res,"------>1");
            this.getPalletTransportsMaterialData()
          })
        // }else{
        // this.$message.error('移库不能小于0')
        // }
      }else{
        this.$message.error('移库已经执行')
      }
      updateStock(data).then((res) =>{
        if(res.data.code===0){
          this.getPalletTransportsMaterialData()
          this.executeMove()
        }
      })
    },
    // 执行移库
    executeMove() {
      if (
        this.palletTransportsDetailMultipleSelection &&
        this.palletTransportsDetailMultipleSelection.length > 0
@@ -792,7 +787,6 @@
            flag = false
          }
        })
        console.log("-----------",flag,ids);
        if (flag) {
          executeMoveLocation(ids).then((response) => {
            const resData = response.data