zhangjingyuan 3 лет назад
Родитель
Сommit
2876c00f4d
2 измененных файлов с 30 добавлено и 108 удалено
  1. 3 19
      src/views/component/weiZhiChangGui.vue
  2. 27 89
      src/views/component/wuliaoPosition.vue

+ 3 - 19
src/views/component/weiZhiChangGui.vue

@@ -91,7 +91,7 @@
                       v-for="(it, index) in listData[index]"
                       :key="index"
                       class="goods-dsc"
-                      :style="{ background: it.cun_fang_wei_zhi_ == '空' ? '' : '#67c23a'}"
+                      :style="{ background:(it.wu_liao_ming_chen) ? '#67c23a':'#e6a23c'}"
                       @click="closeView(it)"
                     >
                       <div class="top-dsc">
@@ -428,7 +428,7 @@ p {
   right: 100px;
   top: 50px;
   //
-   background: #f56c6c;
+  background: #f56c6c;
   font-size: 16px;
   padding:0px 4px;
   border-radius: 5px;
@@ -491,24 +491,9 @@ p {
         line-height: 30px;
         margin-left: 20px;
         margin-bottom: 6px;
-        /* margin-top: 6px; */
         border-radius: 10px;
         position: relative;
         .tiaojian {
-          // position: absolute;
-          // right: 0px;
-          // top: 0px;
-          // background-color: #f56c6c;
-          // border-radius: 10px;
-          // color: #fff;
-          // display: inline-block;
-          // font-size: 12px;
-          // height: 18px;
-          // line-height: 18px;
-          // padding: 0 6px;
-          // text-align: center;
-          // white-space: nowrap;
-          // border: 1px solid #fff;
           font-size: 12px;
         }
       }
@@ -548,7 +533,7 @@ p {
       width: 100%;
       .goods-items {
         width: 100%;
-        overflow-x: hidden;
+        overflow: hidden;
         border: solid 2px rgb(202, 236, 247);
         display: flex;
         flex-direction: column-reverse;
@@ -557,7 +542,6 @@ p {
           border-bottom: 1px solid bisque;
           margin: 0 auto;
           text-align: center;
-          // overflow-y: scroll;
           .goods-level {
             display: flex;
             position: relative;

+ 27 - 89
src/views/component/wuliaoPosition.vue

@@ -1,7 +1,5 @@
 <template>
   <div class="sample-content">
-    <!-- 表格組件 -->
-    <!-- <div @dblclick="clickBtn">{{ showValue }}</div> -->
     <div @click="clickBtn" style="cursor: pointer">
       <el-input
         placeholder="请输入内容"
@@ -9,7 +7,6 @@
         id="valueDom"
       ></el-input>
     </div>
-    <!-- <el-input></el-input> -->
     <div class="selectArea" v-if="ifshow">
       <div @click="close" class="close-content">
         <i class="el-icon-close"></i><el-button class="closeBtn">关闭视图</el-button>
@@ -100,22 +97,25 @@
                       v-for="(it, index) in listData[index]"
                       :key="index"
                       class="goods-dsc"
-                      :style="{
-                        background:
-                          it.cun_fang_wei_zhi_ == '空' ? '' : '#67c23a',
-                      }"
+                      :style="{ background:(it.wu_liao_ming_chen) ? '#67c23a':'#e6a23c'}"
                       @click="closeView(it)"
                     >
                       <div class="top-dsc">
                         <div class="position">
-                          <p>名称:{{ it.wu_liao_ming_chen || 空 }}</p>
+                          <div style="text-align: left;">
+                            <div style="width:38px;display: inline-block;vertical-align: top;">名称:</div>
+                            <span style="width: 115px; display: inline-block; white-space: break-spaces;text-align: left;">{{ it.wu_liao_ming_chen || '空' }} </span>
+                          </div>
                           <p>
                             编码:{{
                               it.wu_liao_bian_ma_ || it.wu_liao_bian_ma_
                             }}
                           </p>
                           <p>位置:{{ it.wei_zhi_ || it.cun_fang_wei_zhi_ }}</p>
-                          <p>货号:{{ it.huo_hao_ || "空" }}</p>
+                          <div style="text-align: left;">
+                            <div style="width:38px;display: inline-block;vertical-align: top;">货号:</div>
+                            <span style="width: 115px; display: inline-block; white-space: break-spaces;text-align: left;">{{ it.huo_hao_ || "空" }} </span>
+                          </div>
                         </div>
                         <div class="right-content">
                           <p>入库批号:{{ it.ru_ku_pi_hao_ || "空" }}</p>
@@ -223,50 +223,13 @@ export default {
       }
     },
   },
-  mounted() {
-    this.loadQueryData();
-    this.firstLoadViewData();
-    this.firstLoadQuyu("试剂库1");
-    console.log(this.formData, "formData");
-  },
-  updated() {
-    console.log(this.formData, "formData1");
-  },
-  // beforeDestroy() {
-  //   console.log(this.formData, "formData");
-  //   let id = this.formData.id;
-  //   let Status = this.formData.anNiugTai;
-  //   let ming_chen = this.formInline.cang_ku_ming_chen_value;
-  //   let weizhi = this.showValue;
-  //   console.log(weizhi, ming_chen);
-  //   if (weizhi !="" &&Status =="已入库") {
-  //     // 数据库更新
-  //     curdPost(
-  //       "update",
-  //       '{"tableName":"t_mjwlgl","paramWhere":{"wai_jian_":"' +
-  //         id +
-  //         '",},"paramCond":{"cang_ku_ming_chen":"' +
-  //         ming_chen +
-  //         '","cun_fang_wei_zhi_":"' +
-  //         weizhi +
-  //         '"}}'
-  //     )
-  //       .then((res) => {
-  //         this.$message({
-  //           message: "当前物料位置更新状态更新成功",
-  //           type: "success",
-  //         });
-  //       })
-  //       .catch((err) => {
-  //         console.log(err);
-  //       });
-  //   }
+  // mounted() {
+  //   this.loadQueryData();
+  //   this.firstLoadViewData();
+  //   this.firstLoadQuyu("试剂库1");
   // },
-  methods: {
+   methods: {
     closeView(value) {
-      // let values = value[0];
-      // console.log(value);
-      //  this.showValue = value[0].wei_zhi_?value[0].wei_zhi_:value[0].cun_fang_wei_zhi_;
       if (value.wei_zhi_) {
         this.showValue = value.wei_zhi_;
       } else if (value.cun_fang_wei_zhi_) {
@@ -301,11 +264,7 @@ export default {
       this.selectActive = 1;
       this.firstLoadActive = true;
       this.quyuShow = "1号试剂柜";
-      var sqlString =
-        "select * from t_mjwlgl where cang_ku_ming_chen = '试剂库1'  and cun_fang_wei_zhi_ like" +
-        "'%" +
-        "SJG1" +
-        "%'";
+      var sqlString = "select * from t_mjwlgl where cang_ku_ming_chen = '试剂库1'  and cun_fang_wei_zhi_ like" + "'%" +"SJG1" +"%'";
       this.queryLoad(sqlString, "SJG1");
     },
     sqlSlice(value) {
@@ -336,18 +295,11 @@ export default {
     onSubmits() {
       this.desShow = false;
       //头部按钮查询事
-      // var sqlString = `select * from t_mjwlgl where cang_ku_ming_chen = '${this.formInline.cang_ku_ming_chen_value}' and qu_yu_ = '${this.formInline.qu_yu_value}'`;
       let py = this.formInline.qu_yu_value.split("号")[1].replace(/^\s*/g, "");
       let num = this.formInline.qu_yu_value.split("号")[0];
       let quyu = this.sqlSlice(py);
       let type = (quyu + num).replace(/^\s*/g, "");
-      var sqlString =
-        "select * from t_mjwlgl where cang_ku_ming_chen = '" +
-        this.formInline.cang_ku_ming_chen_value +
-        "' and cun_fang_wei_zhi_ like " +
-        "'%" +
-        type +
-        "%'";
+      var sqlString = "select * from t_mjwlgl where cang_ku_ming_chen = '" + this.formInline.cang_ku_ming_chen_value + "' and cun_fang_wei_zhi_ like " + "'%" +type + "%'";
       this.queryLoad(sqlString, type);
     },
     queryLoad(sql, py) {
@@ -358,28 +310,12 @@ export default {
       const labelsMap = {}; // map存储
       let typeData = [];
       let typeArr = [];
-      var sqltype =
-        `select DISTINCT wei_zhi_ from t_ck where wei_zhi_ like ` +
-        "'%" +
-        py +
-        "%'" +
-        " and cang_ku_ming_chen ='" +
-        this.formInline.cang_ku_ming_chen_value +
-        "' ORDER BY wei_zhi_ ASC ";
-      let classSql =
-        `select DISTINCT SUBSTR(wei_zhi_,1,6) AS wei_zhi_  from t_ck where wei_zhi_ like ` +
-        "'%" +
-        py +
-        "%'" +
-        " and cang_ku_ming_chen ='" +
-        this.formInline.cang_ku_ming_chen_value +
-        "' ORDER BY wei_zhi_ ASC ";
+      var sqltype = `select DISTINCT wei_zhi_ from t_ck where wei_zhi_ like ` + "'%" + py +"%'" + " and cang_ku_ming_chen ='" +this.formInline.cang_ku_ming_chen_value +"' ORDER BY wei_zhi_ ASC ";
+      let classSql =`select DISTINCT SUBSTR(wei_zhi_,1,6) AS wei_zhi_  from t_ck where wei_zhi_ like ` +"'%" + py +"%'" +" and cang_ku_ming_chen ='" +this.formInline.cang_ku_ming_chen_value + "' ORDER BY wei_zhi_ ASC ";
       curdPost("sql", sqltype).then((res) => {
         typeData = res.variables.data; //查询具体仓库某个货架的所有位置
-        // console.log(typeData, "位置");
         curdPost("sql", sql).then((res) => {
           datas = res.variables.data; //具体仓库某个货架的所有物料数据
-          // console.log(datas, "数据");
           typeData.forEach((item) => {
             typeArr[item.wei_zhi_] = [];
             if (datas.length == 0) {
@@ -397,7 +333,6 @@ export default {
               });
             }
           });
-          // console.log(typeArr, "22222222222222");
           curdPost("sql", classSql).then((res2) => {
             let resData = res2.variables.data;
             resData.forEach((item) => {
@@ -449,6 +384,9 @@ export default {
       this.desShow = true;
     },
     clickBtn() {
+      this.loadQueryData();
+      this.firstLoadViewData();
+      this.firstLoadQuyu("试剂库1");
       this.ifshow = !this.ifshow;
     },
   },
@@ -588,8 +526,8 @@ p {
     display: flex;
     box-sizing: border-box;
     height: calc(100vh - 240px);
-    overflow-x: hidden;
-    overflow-y: scroll;
+    // overflow-x: hidden;
+    // overflow-y: scroll;
     .black {
       position: fixed;
       top: 300px;
@@ -612,7 +550,7 @@ p {
       width: 100%;
       .goods-items {
         width: 100%;
-        overflow-x: hidden;
+        overflow: hidden;
         border: solid 2px rgb(202, 236, 247);
         display: flex;
         flex-direction: column-reverse;
@@ -644,9 +582,9 @@ p {
               cursor: pointer;
               // width: 170px;
               // height: 80px;
-              padding: 6px 12px;
+              padding: 6px 6px;
               border-radius: 5px;
-              background: #e6a23c;
+              // background: #e6a23c;
               margin-left: 12px;
               margin-top: 6px;
               //   background-color: aliceblue;
@@ -662,7 +600,7 @@ p {
                   // color: #fbe8ff;
                 }
                 .right-content > p {
-                  margin-left: 15px;
+                  margin-left: 1px;
                   // color: #fbe8ff;
                   text-align: left;
                 }