Просмотр исходного кода

fix:仓库可视化增加液氮罐

zhangjingyuan 2 лет назад
Родитель
Сommit
2cfa312572

+ 9 - 7
src/views/component/fwposition.vue

@@ -189,7 +189,9 @@ export default {
         return value.replace("冷藏柜", "冰箱");
       } else if (value.includes("冷冻柜")) {
         return value.replace("冷冻柜", "冰箱");
-      } else {
+      }else if(value.includes("液氮罐")){
+        return "YDG" + num;
+      }else {
         return value;
       }
     },
@@ -323,12 +325,12 @@ export default {
       this.cenghao = [];
       const labelsMap = {}; // map存储
       let typeData = [];
-      var sqltype =
-        `select DISTINCT SUBSTR(wei_zhi_,1,6) as wei_zhi_ from t_ck where wei_zhi_ like ` +
-        "'%" +
-        py +
-        "%'" +
-        "ORDER BY wei_zhi_ ASC "; //
+        var sqltype = "";
+        if(py.includes("YDG")){
+        sqltype = `select DISTINCT SUBSTR(wei_zhi_,1,9) as wei_zhi_ from t_ck where wei_zhi_ like ` +"'%" +py +"%'" +"ORDER BY wei_zhi_ ASC "; //
+      }else{
+        sqltype = `select DISTINCT SUBSTR(wei_zhi_,1,6) as wei_zhi_ from t_ck where wei_zhi_ like ` +"'%" +py +"%'" +"ORDER BY wei_zhi_ ASC "; //
+      }
       curdPost("sql", sqltype).then((res) => {
         typeData = res.variables.data; //查询该位置具有多少层
         curdPost("sql", sql).then((res) => {

+ 8 - 6
src/views/component/zhuposition.vue

@@ -280,6 +280,8 @@ export default {
         return "HJ" + num;
       } else if (value.includes("试剂柜")) {
         return "SJG" + num;
+      }else if(value.includes("液氮罐")){
+        return "YDG" + num;
       }
     },
     loadQueryData() {
@@ -317,12 +319,12 @@ export default {
       this.cenghao = [];
       const labelsMap = {}; // map存储
       let typeData = [];
-      var sqltype =
-        `select DISTINCT SUBSTR(wei_zhi_,1,6) as wei_zhi_ from t_ck where wei_zhi_ like ` +
-        "'%" +
-        py +
-        "%'" +
-        "ORDER BY wei_zhi_ ASC "; //
+      var sqltype = "";
+      if(py.includes("YDG")){
+        sqltype = `select DISTINCT SUBSTR(wei_zhi_,1,9) as wei_zhi_ from t_ck where wei_zhi_ like ` +"'%" +py +"%'" +"ORDER BY wei_zhi_ ASC "; //
+      }else{
+        sqltype = `select DISTINCT SUBSTR(wei_zhi_,1,6) as wei_zhi_ from t_ck where wei_zhi_ like ` +"'%" +py +"%'" +"ORDER BY wei_zhi_ ASC "; //
+      }
       console.log(sqltype, sql, "传进来参数");
       curdPost("sql", sqltype).then((res) => {
         typeData = res.variables.data; //查询该位置具有多少层

+ 9 - 2
src/views/warehouse/cangku.vue

@@ -239,6 +239,8 @@ export default {
         return "HJ"+num;
       }else if(value.includes("试剂柜")){
         return "SJG"+num;
+      }else if(value.includes("液氮罐")){
+        return "YDG" + num;
       }
     },
     loadQueryData() {//查询选择仓库数据查询
@@ -272,8 +274,13 @@ export default {
       this.cenghao = [];
       const labelsMap = {}; // 货架分层的数据初始化
       let typeData = [];
-      var sqltype = 
-        `select DISTINCT SUBSTR(wei_zhi_,1,6) as wei_zhi_ from t_ck where wei_zhi_ like ` +"'%" +py +"%'" +"ORDER BY wei_zhi_ ASC "; //
+      var sqltype = "";
+      if(py.includes("YDG")){
+        sqltype = `select DISTINCT SUBSTR(wei_zhi_,1,9) as wei_zhi_ from t_ck where wei_zhi_ like ` +"'%" +py +"%'" +"ORDER BY wei_zhi_ ASC "; //
+      }else{
+        sqltype = `select DISTINCT SUBSTR(wei_zhi_,1,6) as wei_zhi_ from t_ck where wei_zhi_ like ` +"'%" +py +"%'" +"ORDER BY wei_zhi_ ASC "; //
+      }
+      
       
       curdPost("sql", sqltype).then((res) => {
         typeData = res.variables.data; //查询该位置具有多少层