zhanghonglin
5 天以前 48ed41879227c9b495f48ecd7cfde0acfd375da3
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Client/src/views/wmsPart/locationimg.vue
@@ -1013,6 +1013,7 @@
        <div id="xian"></div>
      </div>
    </div>
    <div id="zxjrk" @click="zxjrks">开启整形机入库</div>
    <div id="zxj" @click="zxj">整形机</div>
    <div id="kc" @click="kc">出库</div>
    <div id="gzj" @click="gzj">规整机</div>
@@ -1026,12 +1027,14 @@
import axios from "axios";
import { useStore } from "vuex";
import { getCurrentInstance } from "vue";
//import { useRouter } from 'vue - router';
const wei = ref("");
const weis = ref("");
const swei = ref("");
const lie = ref("");
const bao = ref(0);
const zxjrk = ref(0);
const qu = ref(0);
const ji = ref(0);
@@ -1046,6 +1049,18 @@
const store = useStore();
const data = ref({});
//整形机入库
const zxjrks = () => {
  let t = document.getElementById("zxjrk");
  if (zxjrk.value == 0) {
    zxjrk.value = 1;
    t.style.background = "red";
  } else {
    zxjrk.value = 0;
    t.style.background = "#f60";
  }
};
//修改库位保护按钮
const baohu = k => {
@@ -1087,24 +1102,24 @@
    if (ji.value == 1) {
      //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("出库成功");
          }
        });
        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("信号不正确");
      }
@@ -1113,21 +1128,21 @@
    } else if (ji1.value == 1) {
      //判断信号////////////////////////////////////////////////////////////////////////////////
      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("剔除出库无法选中普通库位");
        }
      });
        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("信号不正确");
      }
@@ -1159,10 +1174,12 @@
  }
};
//剔除入库
//入库
const kr = () => {
  let t = document.getElementById("zxj");
  let tt = document.getElementById("zxjrk");
  if (ji.value == 1 && wei.value != "") {
    //剔除入库
    //判断信号////////////////////////////////////////////////////////////////////////////////
    if (R_ZXJ_TC_isready.value == true && R_TCMode_TC.value == true) {
      axios.post("api/Task/tichuruku/?wei=" + wei.value, {}).then(x => {
@@ -1180,6 +1197,27 @@
          alert("剔除入库必须选择剔除库位");
        }
      });
      //整形机入库 R_ZXJ_TC_isready.value == true ////////////////////////////////////////////////////////
    } else if (zxjrk.value == 1) {
      axios
        .post("api/Task/zxjruku/?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 == 2) {
            alert("入库成功");
          } else if (x.data.message == 3) {
            alert("入库失败");
          } else if (x.data.message == 4) {
            alert("库存里面已有货");
          } else if (x.data.message == 5) {
            alert("整形机入库必须选择正常库位");
          }
          zxjrk.value = 0;
          tt.style.background = "#f60";
        });
    } else {
      alert("信号不正确");
    }
@@ -1343,6 +1381,25 @@
</script>
<style scoped>
#zxjrk:hover {
  opacity: 0.8;
  color: black;
}
#zxjrk {
  width: 10%;
  height: 5%;
  background: #f60;
  float: left;
  border: 1px solid black;
  border-radius: 5px;
  position: absolute;
  top: 73%;
  left: 2%;
  text-align: center;
  color: white;
  line-height: 240%;
  cursor: pointer;
}
.qiean {
  width: 15%;
  height: 70%;