소스 검색

样品接收

shenqilong 1 년 전
부모
커밋
97fb788061
2개의 변경된 파일10개의 추가작업 그리고 10개의 파일을 삭제
  1. 5 5
      src/views/system/jbdScan/js/manualConfirmationJS.js
  2. 5 5
      src/views/system/jbdScan/js/sampleConfirmationJS.js

+ 5 - 5
src/views/system/jbdScan/js/manualConfirmationJS.js

@@ -1015,17 +1015,17 @@ export default {
                 console.log(arr, arr[i].jian_ce_xiang_mu_id)
                 const sql = `select bao_gao_zhou_qi_g from t_mjjcnlfw where FIND_IN_SET(id_,'${arr[i].jian_ce_xiang_mu_id}')`
                 var maxAge
-                await repostCurd('sql', sql).then((res) => {
+                await repostCurd('sql', sql).then(async (res) => {
                     const { data = [] } = res.variables || {}
-                    maxAge = data.reduce((max, person) => {
+                    maxAge = await data.reduce(async (max, person) => {
                         // 将age从字符串转换为数字
-                        maxAge = parseInt(person.bao_gao_zhou_qi_g)
+                        var maxNum = await parseInt(person.bao_gao_zhou_qi_g)
                         // 使用三元表达式比较并更新最大值
-                        return maxAge > max ? maxAge : max
+                        return maxNum > max ? maxNum : max
                     }, 0)
                     const currentDate = new Date()
 
-                    //  创建一个新的日期对象,表示当前日期加上3天
+                    //  创建一个新的日期对象,表示当前日期加上3天
                     const futureDate = new Date(currentDate)
 
                     futureDate.setDate(currentDate.getDate() + Number(maxAge))

+ 5 - 5
src/views/system/jbdScan/js/sampleConfirmationJS.js

@@ -956,17 +956,17 @@ export default {
                 console.log(arr, arr[i].jian_ce_xiang_mu_id)
                 const sql = `select bao_gao_zhou_qi_g from t_mjjcnlfw where FIND_IN_SET(id_,'${arr[i].jian_ce_xiang_mu_id}')`
                 var maxAge
-                await repostCurd('sql', sql).then((res) => {
+                await repostCurd('sql', sql).then(async (res) => {
                     const { data = [] } = res.variables || {}
-                    maxAge = data.reduce((max, person) => {
+                    maxAge = await data.reduce(async (max, person) => {
                         // 将age从字符串转换为数字
-                        maxAge = parseInt(person.bao_gao_zhou_qi_g)
+                        var maxNum = await parseInt(person.bao_gao_zhou_qi_g)
                         // 使用三元表达式比较并更新最大值
-                        return maxAge > max ? maxAge : max
+                        return maxNum > max ? maxNum : max
                     }, 0)
                     const currentDate = new Date()
 
-                    //  创建一个新的日期对象,表示当前日期加上3天
+                    //  创建一个新的日期对象,表示当前日期加上3天
                     const futureDate = new Date(currentDate)
 
                     futureDate.setDate(currentDate.getDate() + Number(maxAge))