ソースを参照

修改样品标签打印

ZZJ 3 年 前
コミット
7bb1dc56bb
1 ファイル変更7 行追加16 行削除
  1. 7 16
      src/views/system/jbdScan/goods/sampleTag.vue

+ 7 - 16
src/views/system/jbdScan/goods/sampleTag.vue

@@ -139,21 +139,20 @@ export default {
         this.sampleShuLiangList.push(parseInt(item.split(" ")[1]))
       })
       idStr = idStr.substring(0,idStr.length-1);
-      this.getLooks(idStr,this.sampleShuLiangList)
+      if(!isNaN(this.sampleShuLiangList[0])){
+        this.getLooks(idStr,this.sampleShuLiangList)
+      }else{
+        this.getLook(idStr)
+      }
 
     },
-    getLooks(id,list) {
-      console.log(id)
-      console.log(list)
+    getLooks(id,ShuLiangList) {
       let sql = `select * from t_mjypb where find_in_set(id_,'${id}')`
-      // console.log(sql)
       repostCurd("sql", sql).then(res => {
           const data = res.variables.data
           let list = []
           data.forEach((item,index) => {
-            // let num = parseInt(item.shou_yang_shu_lia)
-            let num = this.sampleShuLiangList[index]
-            // console.log(num)
+            let num = ShuLiangList[index]
             if(typeof(num) == 'number'){
                 let o = {
                   name: item.yang_pin_ming_che,
@@ -169,18 +168,13 @@ export default {
       })
     },
     getLook(id) {
-      // console.log(id)
       let sql = `select * from t_mjypdjb where find_in_set(id_,'${id}')`
-      console.log(sql)
       repostCurd("sql", sql).then(res => {
           const data = res.variables.data
-          // console.log(data)
           let list = []
           data.forEach(item => {
             let num = parseInt(item.shou_yang_shu_lia)
             if(typeof(num) == 'number'){
-              // console.log(num)
-              // for(let i = 0;i<num;i++){
                 let o = {
                   name: item.yang_pin_ming_che,
                   serial: item.yang_pin_bian_hao,
@@ -189,12 +183,9 @@ export default {
                   // condition: item.yang_ben_yun_shu_
                 }
                 list.push(o)
-            // }
             }
           })
-          // console.log(list)
           this.list = list
-          // console.log(this.list)
       })
     }
   }