liujiayin 2 лет назад
Родитель
Сommit
5680a022aa
1 измененных файлов с 25 добавлено и 18 удалено
  1. 25 18
      src/views/system/jbdScan/goods/kucuntag.vue

+ 25 - 18
src/views/system/jbdScan/goods/kucuntag.vue

@@ -58,7 +58,7 @@ export default {
       type: Boolean,
       default: true
     },
-    scanVisible: {
+    scanVisibleZ: {
       type: Boolean,
       default: false
     },
@@ -112,17 +112,7 @@ export default {
           width: '100%'
         }
       ],
-      list: [{
-        wu_liao_ming_chen: '-',
-        wu_liao_bian_ma_: '-',
-        huo_hao_: '-',
-        pi_hao_: '-',
-        create_time_: '-',
-        you_xiao_qi_: '-',
-        sheng_chan_chang_: '-',
-        cun_chu_yao_qiu_: '-',
-        barcode: '-'
-      }],
+      list: [],
       title: "物料标签",
       value: '',
       id: '',
@@ -132,6 +122,11 @@ export default {
   watch: {
     obj() {
       this.getInit()
+    },
+    scanVisible(i) {
+      if (i == false) {
+        this.list = JSON.parse(JSON.stringify([]))
+      }
     }
   },
   created() {
@@ -153,7 +148,19 @@ export default {
       let sql = `select * from t_cgysjlb where wai_jian_ in (${id})`
       repostCurd("sql", sql).then(res => {
         if (res.state === 200) {
-          this.list = res.variables.data
+          for (var i of res.variables.data) {
+            let listData = {
+              wu_liao_ming_chen: i.wu_liao_ming_chen ? i.wu_liao_ming_chen : '-',
+              wu_liao_bian_ma_: i.wu_liao_bian_ma_ ? i.wu_liao_bian_ma_ : '-',
+              huo_hao_: i.huo_hao_ ? i.huo_hao_ : '-',
+              pi_hao_: i.pi_hao_ ? i.pi_hao_ : '-',
+              create_time_: i.create_time_ ? this.getData(i.create_time_) : '-',
+              you_xiao_qi_: i.you_xiao_qi_ ? i.you_xiao_qi_ : '-',
+              sheng_chan_chang_: i.sheng_chan_chang_ ? i.sheng_chan_chang_ : '-',
+              cun_chu_yao_qiu_: i.cun_chu_yao_qiu_ ? i.cun_chu_yao_qiu_ : '-',
+            }
+            this.list.push(listData)
+          }
         }
       })
     },
@@ -173,21 +180,21 @@ export default {
   min-width: 500px;
   height: 680px;
 }
-.logoImg{
-    width: 30px;
-    height: 30px;
+.logoImg {
+  width: 30px;
+  height: 30px;
 }
 .content {
   // display: flex;
   // flex-wrap: wrap;
   // justify-content: center;
   padding: 10px;
-  min-height: 380px;
+  //   min-height: 380px;
   overflow: auto;
   .box {
     position: relative;
     width: 300px;
-    height: 240px;
+    // height: 290px;
     font-size: 14px;
     padding: 10px;
     margin: 0 auto 20px;