From 05c6ee06af8164aea9346368875c539f253a89b9 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 17 九月 2026 19:44:21 +0800
Subject: [PATCH] 新疆——新聚lims 1.检验任务单详情输入检验值时不限制小数点位数

---
 src/views/business/inspectionTask/components/InspectionWord.vue |   31 -------
 src/workers/DataWorker.worker.js                                |   36 +-------
 src/views/business/inspectionView/index.vue                     |   31 -------
 src/workers/InspectionWorker.worker.js                          |   69 ----------------
 src/views/business/inspectionTask/inspection.vue                |   31 -------
 5 files changed, 14 insertions(+), 184 deletions(-)

diff --git a/src/views/business/inspectionTask/components/InspectionWord.vue b/src/views/business/inspectionTask/components/InspectionWord.vue
index 54ddbd0..d9ff99f 100644
--- a/src/views/business/inspectionTask/components/InspectionWord.vue
+++ b/src/views/business/inspectionTask/components/InspectionWord.vue
@@ -115,9 +115,9 @@
                       </el-select>
                     </template>
                     <template v-else-if="n.v.ps != undefined && n.v.ps.value === '璁$畻鍊�' && state == 1"><span
-                        :style="`font-family:${n.v.ff} !important;`">{{ toFixed(n.v.v, n.v.ct) }}</span></template>
+                        :style="`font-family:${n.v.ff} !important;`">{{ n.v.v }}</span></template>
                     <template v-else-if="n.v.ps != undefined && n.v.ps.value === '鏈�缁堝��' && state == 1">
-                      <span :style="`font-family:${n.v.ff} !important;`">{{ toFixed(n.v.v, n.v.ct) }}</span>
+                      <span :style="`font-family:${n.v.ff} !important;`">{{ n.v.v }}</span>
                     </template>
                     <template v-else-if="n.v.ps != undefined && n.v.ps.value === '鏍峰搧缂栧彿'">
                       <div :title="currentSample.sampleCode"
@@ -1242,13 +1242,6 @@
     getValue(v) {
       // 瀵归〉闈㈠睍绀烘暟鎹繘琛屽鐞�,@,浠h〃鎹㈣
       let str = v.v ? v.v : (v.v === 0 ? v.v : (v.ct && v.ct.s ? v.ct.s.length > 0 && v.ct.s[0].v.replace(new RegExp('\n', 'g'), '<br/>').replace(new RegExp('@', 'g'), '<br/>') : ''))
-      // 瀵规暟鎹繚鐣欏皬鏁扮偣杩涜澶勭悊
-      if (v.ct && v.ct.fa && v.ct.fa.includes('.') && str) {
-        let num = 0
-        let str0 = v.ct.fa.split('.')[1]
-        num = str0.length
-        str = Number(str).toFixed(num)
-      }
       if (v.v && typeof v.v == 'string' && v.v.includes('@')) {
         str = v.v.replace(new RegExp('@', 'g'), '<br/>')
       }
@@ -1739,26 +1732,6 @@
       }).catch(error => {
 
       })
-    },
-    /**
-     * 灏嗘暟鍊紇淇濈暀ct.fa涓�'##'鍚庣殑鎸囧畾灏忔暟浣嶆暟锛屽苟杩斿洖鏍煎紡鍖栧悗鐨勫瓧绗︿覆銆�
-     *
-     * @param v 瑕佹牸寮忓寲鐨勬暟鍊�
-     * @param ct 鍖呭惈鏍煎紡鍖栭厤缃殑瀵硅薄
-     * @param ct.fa 鏍煎紡鍖栭厤缃瓧绗︿覆锛岃嫢鍖呭惈'##'鍒欐寜鐓у叾鍚庣殑鍐呭纭畾灏忔暟浣嶆暟
-     * @returns 鏍煎紡鍖栧悗鐨勫瓧绗︿覆鎴栧師濮嬫暟鍊硷紙鑻ラ厤缃笉绗﹀悎瑕佹眰锛�
-     */
-    toFixed(v, ct) {
-      if (v && ct && ct.fa) {
-        if (ct.fa.includes('.')) {
-          let num = ct.fa.slice(4).length
-          return Number(v).toFixed(num)
-        } else {
-          return v
-        }
-      } else {
-        return v
-      }
     }
   }
 }
diff --git a/src/views/business/inspectionTask/inspection.vue b/src/views/business/inspectionTask/inspection.vue
index c05b7fa..749bdd3 100644
--- a/src/views/business/inspectionTask/inspection.vue
+++ b/src/views/business/inspectionTask/inspection.vue
@@ -298,7 +298,7 @@
                       n.v.ps.value === '璁$畻鍊�' &&
                       state == 1
                     "><span :style="`font-family:${n.v.ff} !important;`">{{
-                      toFixed(n.v.v, n.v.ct)
+                      n.v.v
                     }}</span></template>
                     <template v-else-if="
                       n.v.ps != undefined &&
@@ -306,7 +306,7 @@
                       state == 1
                     ">
                       <span :style="`font-family:${n.v.ff} !important;`">{{
-                        toFixed(n.v.v, n.v.ct)
+                        n.v.v
                       }}</span>
                     </template>
                     <template v-else-if="
@@ -2166,13 +2166,6 @@
               .replace(new RegExp("\n", "g"), "<br/>")
               .replace(new RegExp("@", "g"), "<br/>")
             : "";
-      // 瀵规暟鎹繚鐣欏皬鏁扮偣杩涜澶勭悊
-      if (v.ct && v.ct.fa && v.ct.fa.includes(".") && str) {
-        let num = 0;
-        let str0 = v.ct.fa.split(".")[1];
-        num = str0.length;
-        str = Number(str).toFixed(num);
-      }
       if (v.v && typeof v.v == "string" && v.v.includes("@")) {
         str = v.v.replace(new RegExp("@", "g"), "<br/>");
       }
@@ -2716,26 +2709,6 @@
         this.$download.saveAs(res.data.fileUrl, row.fileName)
       })
         .catch((error) => { });
-    },
-    /**
-     * 灏嗘暟鍊紇淇濈暀ct.fa涓�'##'鍚庣殑鎸囧畾灏忔暟浣嶆暟锛屽苟杩斿洖鏍煎紡鍖栧悗鐨勫瓧绗︿覆銆�
-     *
-     * @param v 瑕佹牸寮忓寲鐨勬暟鍊�
-     * @param ct 鍖呭惈鏍煎紡鍖栭厤缃殑瀵硅薄
-     * @param ct.fa 鏍煎紡鍖栭厤缃瓧绗︿覆锛岃嫢鍖呭惈'##'鍒欐寜鐓у叾鍚庣殑鍐呭纭畾灏忔暟浣嶆暟
-     * @returns 鏍煎紡鍖栧悗鐨勫瓧绗︿覆鎴栧師濮嬫暟鍊硷紙鑻ラ厤缃笉绗﹀悎瑕佹眰锛�
-     */
-    toFixed(v, ct) {
-      if (v && ct && ct.fa) {
-        if (ct.fa.includes(".")) {
-          let num = ct.fa.slice(4).length;
-          return Number(v).toFixed(num);
-        } else {
-          return v;
-        }
-      } else {
-        return v;
-      }
     },
     async goback() {
       await this.waitForPendingSaves();
diff --git a/src/views/business/inspectionView/index.vue b/src/views/business/inspectionView/index.vue
index 5a520f1..c5a7b6f 100644
--- a/src/views/business/inspectionView/index.vue
+++ b/src/views/business/inspectionView/index.vue
@@ -257,7 +257,7 @@
                       n.v.ps.value === '璁$畻鍊�' &&
                       state == 1
                     "><span :style="`font-family:${n.v.ff} !important;`">{{
-                      toFixed(n.v.v, n.v.ct)
+                      n.v.v
                     }}</span></template>
                   <template v-else-if="
                       n.v.ps != undefined &&
@@ -265,7 +265,7 @@
                       state == 1
                     ">
                       <span :style="`font-family:${n.v.ff} !important;`">{{
-                          toFixed(n.v.v, n.v.ct)
+                          n.v.v
                         }}</span>
                   </template>
                   <template v-else-if="
@@ -1949,13 +1949,6 @@
               .replace(new RegExp("\n", "g"), "<br/>")
               .replace(new RegExp("@", "g"), "<br/>")
             : "";
-      // 瀵规暟鎹繚鐣欏皬鏁扮偣杩涜澶勭悊
-      if (v.ct && v.ct.fa && v.ct.fa.includes(".") && str) {
-        let num = 0;
-        let str0 = v.ct.fa.split(".")[1];
-        num = str0.length;
-        str = Number(str).toFixed(num);
-      }
       if (v.v && typeof v.v == "string" && v.v.includes("@")) {
         str = v.v.replace(new RegExp("@", "g"), "<br/>");
       }
@@ -2476,26 +2469,6 @@
         this.$download.saveAs(res.data.fileUrl, row.fileName)
       })
         .catch((error) => { });
-    },
-    /**
-     * 灏嗘暟鍊紇淇濈暀ct.fa涓�'##'鍚庣殑鎸囧畾灏忔暟浣嶆暟锛屽苟杩斿洖鏍煎紡鍖栧悗鐨勫瓧绗︿覆銆�
-     *
-     * @param v 瑕佹牸寮忓寲鐨勬暟鍊�
-     * @param ct 鍖呭惈鏍煎紡鍖栭厤缃殑瀵硅薄
-     * @param ct.fa 鏍煎紡鍖栭厤缃瓧绗︿覆锛岃嫢鍖呭惈'##'鍒欐寜鐓у叾鍚庣殑鍐呭纭畾灏忔暟浣嶆暟
-     * @returns 鏍煎紡鍖栧悗鐨勫瓧绗︿覆鎴栧師濮嬫暟鍊硷紙鑻ラ厤缃笉绗﹀悎瑕佹眰锛�
-     */
-    toFixed(v, ct) {
-      if (v && ct && ct.fa) {
-        if (ct.fa.includes(".")) {
-          let num = ct.fa.slice(4).length;
-          return Number(v).toFixed(num);
-        } else {
-          return v;
-        }
-      } else {
-        return v;
-      }
     },
     goback() {
       this.$router.go(-1)
diff --git a/src/workers/DataWorker.worker.js b/src/workers/DataWorker.worker.js
index 218ed78..a1c7546 100644
--- a/src/workers/DataWorker.worker.js
+++ b/src/workers/DataWorker.worker.js
@@ -65,16 +65,8 @@
                   if(i+1==arr[1]){
                     // 璧嬪�兼暟閲囦紭鍖栨楠岄」鍒楄〃
                     arrSpecial.push(n.i)
-                    let num0 = 0
-                    if(n.v.ct&&n.v.ct.fa&&typeof n.v.ct.fa == 'string'&&n.v.ct.fa.includes('.')){
-                      // 淇濈暀妯℃澘閰嶇疆鐨勫皬鏁扮偣浣嶆暟
-                      let str0 = n.v.ct.fa.split('.')[1]
-                      num0 = str0.length
-                      n.v.v = dataAcquisitionInfo[str].value[i]?Number(dataAcquisitionInfo[str].value[i]).toFixed(num0):dataAcquisitionInfo[str].value[i]
-                    }else{
-                      // 鐩存帴璧嬪��
-                      n.v.v = dataAcquisitionInfo[str].value[i]
-                    }
+                    // 鐩存帴璧嬪��
+                    n.v.v = dataAcquisitionInfo[str].value[i]
                     // 浼犻�掔粰涓荤嚎绋�
                     result = {
                       method:'changeInput',
@@ -92,16 +84,8 @@
                   // 濡傛灉鏁伴噰娆℃暟绛変簬妫�楠屽�煎簭鍙凤紝鍒欒祴鍊肩粰褰撳墠妫�楠屽��
                   arrSpecial.push(n.i)
                   setTimeout(()=>{
-                    let num0 = 0
-                    if(n.v.ct&&n.v.ct.fa&&typeof n.v.ct.fa == 'string'&&n.v.ct.fa.includes('.')){
-                      // 淇濈暀妯℃澘閰嶇疆鐨勫皬鏁扮偣浣嶆暟
-                      let str0 = n.v.ct.fa.split('.')[1]
-                      num0 = str0.length
-                      n.v.v = dataAcquisitionInfo[str].value?Number(dataAcquisitionInfo[str].value).toFixed(num0):dataAcquisitionInfo[str].value
-                    }else{
-                      // 鐩存帴璧嬪��
-                      n.v.v = dataAcquisitionInfo[str].value
-                    }
+                    // 鐩存帴璧嬪��
+                    n.v.v = dataAcquisitionInfo[str].value
                     // 浼犻�掔粰涓荤嚎绋�
                     result = {
                       method:'changeInput',
@@ -117,16 +101,8 @@
                   if(n.v.ps.value.includes(num)){
                     arrSpecial.push(n.i)
                     setTimeout(()=>{
-                      let num0 = 0
-                      if(n.v.ct&&n.v.ct.fa&&typeof n.v.ct.fa == 'string'&&n.v.ct.fa.includes('.')){
-                        // 淇濈暀妯℃澘閰嶇疆鐨勫皬鏁扮偣浣嶆暟
-                        let str0 = n.v.ct.fa.split('.')[1]
-                        num0 = str0.length
-                        n.v.v = dataAcquisitionInfo[str].value?Number(dataAcquisitionInfo[str].value).toFixed(num0):dataAcquisitionInfo[str].value
-                      }else{
-                        // 鐩存帴璧嬪��
-                        n.v.v = dataAcquisitionInfo[str].value
-                      }
+                      // 鐩存帴璧嬪��
+                      n.v.v = dataAcquisitionInfo[str].value
                       // 浼犻�掔粰涓荤嚎绋�
                       result = {
                         method:'changeInput',
diff --git a/src/workers/InspectionWorker.worker.js b/src/workers/InspectionWorker.worker.js
index 8319427..119d3ce 100644
--- a/src/workers/InspectionWorker.worker.js
+++ b/src/workers/InspectionWorker.worker.js
@@ -227,8 +227,6 @@
       break;
     }
   }
-  let isToExponential = ""; //鏄惁涓虹瀛﹁鏁版硶
-  let list2 = []; //涓�涓暟缁勶紝閲岄潰淇濆瓨鏈夊綋鍓嶆楠岄」鐨勬墍鏈夊弬鏁板��
   let isPoint = ""; //鏄惁涓哄皬鏁扮偣
   let inputType = null;
   let currentInsItemId = "";
@@ -262,7 +260,6 @@
                     break;
                   }
                 }
-                list2.push(c.v.v);
                 // 缁勮鍙傛暟鐨勫璞¢泦鍚堝苟璧嬪�硷紝鍒楀{A3:12,B4:15}
                 if (
                   (getInspectionValueType(item.i) == 1 ||
@@ -341,22 +338,7 @@
             }
             // 鏍规嵁杈撳叆鐨勬暟鍊硷紝杩涜璁$畻
             comResult = compute(item.v.f.replace(/=/g, " "), comValue, isPoint);
-            // 妫�楠岄」涓哄瘑搴︽椂锛屾牴鎹姹傚�肩殑灏忔暟浣嶆敼鍙樻渶缁堝�肩殑灏忔暟浣�
-            if (inspectionItem == "瀵嗗害") {
-              const str = "" + tell;
-              const indexOfDecimal = str.indexOf(".");
-              if (indexOfDecimal > -1) {
-                const length = str.length - indexOfDecimal - 1;
-                comResult = comResult.toFixed(length);
-              }
-            } else if (
-              inspectionItemClass == "澶栨姢濂楁満姊扮墿鐞嗘�ц兘" &&
-              inspectionItem == "鍦↖RM 902鐭跨墿娌逛腑娴告场鍚�" &&
-              (inspectionItemSubclass == "鏂浼搁暱鐜囧彉鍖栫巼" ||
-                inspectionItemSubclass == "鎶楀紶寮哄害鍙樺寲鐜�")
-            ) {
-              comResult = Math.round(comResult).toFixed(0);
-            } else if (
+            if (
               typeof comResult == "string" &&
               (comResult.includes("鏂") || comResult.includes("鑴嗗寲"))
             ) {
@@ -384,15 +366,6 @@
             }
             if (isHaveSymbol) {
               comResult = symbol + comResult;
-            }
-            let list3 = list2.map((item) => item + "");
-            // 鍒ゆ柇濉殑妫�楠屽�兼槸鍚︿负绉戝璁℃暟娉曪紝濡傛灉涓虹瀛﹁鏁版硶锛屽垯杩涜杞寲
-            isToExponential = list3.some(
-              (val) => val.includes("e+") || val.includes("e-")
-            );
-            if (isToExponential) {
-              let num2 = new Big(comResult);
-              comResult = num2.toExponential(1);
             }
           } else {
             // 濡傛灉妫�楠屽�肩被鍨嬫槸鏂囨湰杈撳叆妗嗐�佷笅鎷夋
@@ -432,45 +405,7 @@
               // 鍒ゆ柇褰撳墠琛屾槸鍚︿负褰撳墠妫�楠岄」鎵�鍦ㄨ锛屽鏋滀负褰撳墠琛岋紝鍒欑粰琛ㄦ牸鏁版嵁璧嬪��
               for (var b in a) {
                 if (a[b].c == item.c) {
-                  try {
-                    if (comResult == 0) {
-                      // 鍒ゆ柇璁$畻缁撴灉鏄惁涓�0锛屽鏋滀负0锛屽垯缁欒〃鏍兼暟鎹祴鍊间负0
-                      a[b].v.v = 0;
-                    } else if (
-                      a[b].v.ct &&
-                      a[b].v.ct.fa &&
-                      typeof a[b].v.ct.fa == "string" &&
-                      a[b].v.ct.fa.includes(".")
-                    ) {
-                      // 鍒ゆ柇褰撳墠鍗曞厓鏍兼槸鍚︿繚鐣欏皬鏁扮偣锛屽鏋滀负淇濈暀灏忔暟鐐癸紝鍒欑粰琛ㄦ牸鏁版嵁璧嬪�间负淇濈暀灏忔暟鐐癸紝杩欎釜鏄牴鎹ā鏉块厤缃皬鏁扮偣鏉ョ殑
-                      let num = 0;
-                      let str = a[b].v.ct.fa.split(".")[1];
-                      num = str.length;
-                      a[b].v.v = comResult
-                        ? Number(comResult).toFixed(num)
-                        : comResult;
-                    } else if (
-                      typeof comResult == "string" &&
-                      (comResult.includes("e+") || comResult.includes("e-"))
-                    ) {
-                      // 鍒ゆ柇璁$畻缁撴灉鏄惁涓虹瀛﹁鏁版硶锛屽鏋滀负绉戝璁℃暟娉曪紝鍒欑粰琛ㄦ牸鏁版嵁璧嬪�间负绉戝璁℃暟娉�
-                      a[b].v.v = comResult;
-                    } else {
-                      const inspectionItem = findInsItem(item.i).inspectionItem;
-                      // 鍒ゆ柇璁$畻缁撴灉鏄惁涓烘暟瀛楋紝濡傛灉涓烘暟瀛楋紝鍒欑粰琛ㄦ牸鏁版嵁璧嬪�间负鏁板瓧
-                      if (inspectionItem == "閾滅嚎鐢甸樆鐜囅�20鏈�澶у��") {
-                        let val = parseFloat(Number(comResult).toFixed(5));
-                        a[b].v.v = isNaN(val) ? comResult : val;
-                      } else {
-                        let val = parseFloat(Number(comResult).toFixed(3));
-                        a[b].v.v = isNaN(val) ? comResult : val;
-                      }
-                    }
-                  } catch (error) {
-                    // 濡傛灉浠ヤ笂鍒ゆ柇閮戒笉鏀寔锛屽垯鐩存帴璧嬪��
-                    a[b].v.v = comResult;
-                    console.log("error---", error);
-                  }
+                  a[b].v.v = comResult;
                   hasComputedWrite = true;
                   break;
                 }

--
Gitblit v1.9.3