zhanghonglin
6 天以前 10775e2b00cee12fb4b405e18a507c629990051a
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Client/src/views/wmsPart/locationimg.vue
@@ -989,6 +989,13 @@
      </div>
    </div>
    <div id="kuang">
      <div id="qiehuan">
        <div class="qiean" @click="qiehuan(4)"></div>
        <div class="qiean" @click="qiehuan(3)"></div>
        <div class="qiean" @click="qiehuan(2)"></div>
        <div class="qiean" @click="qiehuan(1)"></div>
        <div class="qiean" @click="baohu()" style="background-color: green;">X</div>
      </div>
      <div id="ti">
        <div class="ge" id="a" style="width: 6%;height:60%;margin-top: 1%;margin-left: 1%;"></div>
        <div class="wen">空闲</div>
@@ -1024,6 +1031,7 @@
const weis = ref("");
const swei = ref("");
const lie = ref("");
const bao = ref(0);
const qu = ref(0);
const ji = ref(0);
@@ -1039,6 +1047,36 @@
const store = useStore();
const data = ref({});
//修改库位保护按钮
const baohu = k => {
  bao.value = 0;
  let t = document.getElementsByClassName("qiean");
  t[4].style.background = "green";
  alert("取消成功");
};
//切换库位
const qiehuan = k => {
  let t = document.getElementsByClassName("qiean");
  if (bao.value == 0) {
    bao.value = 1;
    alert("已激活修改库位");
    t[4].style.background = "red";
  } else {
    axios.post("api/LocationInfo/setlocations/?k=" + k, {}).then(x => {
      if (x.data.message == 1) {
        alert("修改成功");
      } else if (x.data.message == 2) {
        alert("库存里有货,无法修改");
      } else if (x.data.message == 4) {
        alert("修改失败");
      }
      bao.value = 0;
      t[4].style.background = "green";
    });
  }
};
//出库
const kc = () => {
  let t = document.getElementById("zxj");
@@ -1047,58 +1085,51 @@
  if (wei.value != "") {
    //普通货半自动出库
    if (ji.value == 1) {
      //判断列
      if (lie.value < 37) {
        //data.value.R_ZXJ_isWork == true &&
        if (R_ZXJ_TCMode.value == true && R_HC_isReadyWork.value == true) {
          axios
            .post(
              "api/Task/banzidong/?wei=" + wei.value + "&weis=" + weis.value,
              {}
            )
            .then(x => {
              qu.value = 0;
              t.style.background = "#f60";
              if (x.data.message == 1) {
                alert("出库失败(可能是 â€œæ˜¯å¦å‡ºåº“” çš„问题)");
              } else if (x.data.message == 3) {
                alert("出库失败(找不到库存)");
              } else {
                alert("出库成功");
              }
              console.log(x);
            });
        } else {
          alert("信号不正确");
        }
      //data.value.R_ZXJ_isWork == true &&
      if (R_ZXJ_TCMode.value == true && R_HC_isReadyWork.value == true) {
      axios
        .post(
          "api/Task/banzidong/?wei=" + wei.value + "&weis=" + weis.value,
          {}
        )
        .then(x => {
          qu.value = 0;
          t.style.background = "#f60";
          if (x.data.message == 1) {
            alert("出库失败(可能是 â€œæ˜¯å¦å‡ºåº“” çš„问题)");
          } else if (x.data.message == 3) {
            alert("出库失败(找不到库存)");
          } else if (x.data.message == 5) {
            alert("普通出库无法选中剔除库位");
          } else {
            alert("出库成功");
          }
        });
      } else {
        alert("普通出库不能选中38列的库");
        alert("信号不正确");
      }
      //剔除货半自动出库
    } else if (ji1.value == 1) {
      //判断列
      if (lie.value >= 37) {
        //判断信号////////////////////////////////////////////////////////////////////////////////
        if (R_TC_isready.value == true) {
          axios.post("api/Task/tichuchuku/?wei=" + wei.value, {}).then(x => {
            qu1.value = 0;
            s.style.background = "#f60";
            if (x.data.message == 1) {
              alert("出库失败(可能是 â€œæ˜¯å¦å‡ºåº“” çš„问题)");
            } else if (x.data.message == 2) {
              alert("出库成功");
            } else if (x.data.message == 3) {
              alert("出库失败");
            } else if (x.data.message == 4) {
              alert("库存里面无货");
            }
          });
        }else{
          alert("信号不正确");
      //判断信号////////////////////////////////////////////////////////////////////////////////
      if (R_TC_isready.value == true) {
      axios.post("api/Task/tichuchuku/?wei=" + wei.value, {}).then(x => {
        qu1.value = 0;
        s.style.background = "#f60";
        if (x.data.message == 1) {
          alert("出库失败(可能是 â€œæ˜¯å¦å‡ºåº“” çš„问题)");
        } else if (x.data.message == 2) {
          alert("出库成功");
        } else if (x.data.message == 3) {
          alert("出库失败");
        } else if (x.data.message == 4) {
          alert("库存里面无货");
        } else if (x.data.message == 5) {
          alert("剔除出库无法选中普通库位");
        }
      });
      } else {
        alert("普通出库只能选中38列的库");
        alert("信号不正确");
      }
    }
    //剔除直接出库
@@ -1128,29 +1159,29 @@
  }
};
//入库
//剔除入库
const kr = () => {
  let t = document.getElementById("zxj");
  if (ji.value == 1 && wei.value != "") {
    if (lie.value >= 37) {
      //判断信号////////////////////////////////////////////////////////////////////////////////
      if (R_ZXJ_TC_isready.value == true && R_TCMode_TC.value == true) {
        axios.post("api/Task/tichuruku/?wei=" + wei.value, {}).then(x => {
          qu.value = 0;
          t.style.background = "#f60";
          if (x.data.message == 1) {
            alert("入库失败(可能是 â€œæ˜¯å¦å‡ºåº“” çš„问题)");
          } else if (x.data.message == 2) {
            alert("入库成功");
          } else if (x.data.message == 3) {
            alert("入库失败");
          } else if (x.data.message == 4) {
            alert("库存里面已有货");
          }
        });
      }
    //判断信号////////////////////////////////////////////////////////////////////////////////
    if (R_ZXJ_TC_isready.value == true && R_TCMode_TC.value == true) {
      axios.post("api/Task/tichuruku/?wei=" + wei.value, {}).then(x => {
        qu.value = 0;
        t.style.background = "#f60";
        if (x.data.message == 1) {
          alert("入库失败(可能是 â€œæ˜¯å¦å‡ºåº“” çš„问题)");
        } else if (x.data.message == 2) {
          alert("入库成功");
        } else if (x.data.message == 3) {
          alert("入库失败");
        } else if (x.data.message == 4) {
          alert("库存里面已有货");
        } else if (x.data.message == 5) {
          alert("剔除入库必须选择剔除库位");
        }
      });
    } else {
      alert("剔除入库只能选中38列的库");
      alert("信号不正确");
    }
  } else {
    alert("请先选中库位和整形机");
@@ -1312,6 +1343,27 @@
</script>
<style scoped>
.qiean {
  width: 15%;
  height: 70%;
  border: 1px solid green;
  float: left;
  margin-left: 5%;
  text-align: center;
  line-height: 3vh;
  font-size: 2vh;
}
.qiean:hover {
  border: 2px solid yellow;
}
#qiehuan {
  width: 13%;
  height: 5%;
  position: absolute;
  left: 85.7%;
  top: 71%;
  cursor: pointer;
}
#kr {
  width: 4%;
  height: 4%;
@@ -1334,7 +1386,7 @@
  width: 10%;
  height: 15%;
  position: absolute;
  top: 75%;
  top: 80%;
  left: 87%;
  text-align: center;
  line-height: 700%;
@@ -1371,7 +1423,7 @@
  width: 10%;
  height: 15%;
  position: absolute;
  top: 75%;
  top: 80%;
  left: 2%;
  text-align: center;
  line-height: 700%;