Sfoglia il codice sorgente

bug-4215 不符合项条款统计调整

tianxinyu 1 anno fa
parent
commit
e21ce28cf4
1 ha cambiato i file con 10 aggiunte e 1 eliminazioni
  1. 10 1
      src/views/system/jbdScan/goods/neishenzhuangtai.vue

+ 10 - 1
src/views/system/jbdScan/goods/neishenzhuangtai.vue

@@ -849,8 +849,12 @@ export default {
         getNoData (arr, type, callBlack) {
         getNoData (arr, type, callBlack) {
             const firstArr = []
             const firstArr = []
             let secondArr = []
             let secondArr = []
-           
             arr.forEach((it) => {
             arr.forEach((it) => {
+                if(it.tiao_kuan_bian_ha.includes("CL02-A001")){
+                    it.tiao_kuan_bian_ha = it.tiao_kuan_bian_ha.split('\n')[1]
+                    console.log('it.tiao_kuan_bian_ha',it.tiao_kuan_bian_ha)
+                } 
+ 
                 const newBianhao = it.tiao_kuan_bian_ha.split('.')[0]
                 const newBianhao = it.tiao_kuan_bian_ha.split('.')[0]
                 if (firstArr.length == 0) {
                 if (firstArr.length == 0) {
                     secondArr.push('score')
                     secondArr.push('score')
@@ -880,6 +884,11 @@ export default {
                     }
                     }
                 }
                 }
             })
             })
+
+            firstArr.sort((a, b) => {
+                // 将字符串转换为数字后比较
+                return Number(a[2]) - Number(b[2]);
+            });
            
            
             type === 'CMA' ? (this.cmaSuorce = firstArr) : (this.source = firstArr)
             type === 'CMA' ? (this.cmaSuorce = firstArr) : (this.source = firstArr)
             callBlack()
             callBlack()