ZZJ %!s(int64=3) %!d(string=hai) anos
pai
achega
d72e807a7e

+ 1 - 0
src/plugins/error/index.js

@@ -16,6 +16,7 @@ export default {
                         }
                     })
                     if (process.env.NODE_ENV !== 'development') return
+                    //if (logType === 'warning') return  
                     util.log.capsule('ibps', 'ErrorHandler', logType)
                     util.log.danger('>>>>>> 错误信息 >>>>>>')
                     console.log(info)

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 404 - 749
src/views/system/jbdScan/goods/manualConfirmation.vue


+ 100 - 106
src/views/system/jbdScan/js/manualConfirmationJS.js

@@ -1,5 +1,4 @@
 import repostCurd from '@/business/platform/form/utils/custom/joinCURD.js'
-import * as dayjs from 'dayjs'
 
 export default {
   methods: {
@@ -29,14 +28,9 @@ export default {
         this.pageCount = res1.variables.data[0].count
         if (res.variables.data && res.variables.data.length > 0) {
           for (let i in res.variables.data) {
-            res.variables.data[i].jie_yang_shu_lian = res.variables.data[i].yang_pin_zong_shu
-            res.variables.data[i].jie_yang_zhuang_t = '确认'
+            res.variables.data[i].jie_yang_shu_lian = 1
+            res.variables.data[i].jie_yang_zhuang_t = '确认'
             res.variables.data[i].biao_zhi_uuid_ = this.uuid()
-            res.variables.data[i].shi_fou_liu_yang_ = '是'
-            res.variables.data[i].yan_shou_jie_guo_ = '完好'
-            res.variables.data[i].liu_yang_ri_qi_ = this.dateFormat()
-            res.variables.data[i].liu_yang_qi_xian = dayjs(res.variables.data[i].song_jian_shi_jia).add(3,'month').format("YYYY-MM-DD")
-            res.variables.data[i].xiao_hui_ri_qi_ = dayjs(res.variables.data[i].liu_yang_qi_xian).endOf('month').format("YYYY-MM-DD")
             this.listData.push(res.variables.data[i])
           }
         }
@@ -79,12 +73,23 @@ export default {
 
           // 获取样品列表
           let ypInfoList = this_.listData
-          console.log(ypInfoList, "样品信息")
+          // console.log(ypInfoList, "样品信息")
 
           let dWhere = []
           let ypbh = []
           let cfwzIdList = [] // 放置 存放位置的ID
+
+          // let ypIdList = [] // 样品id列表,格式转好的
+          // let ypWeiZhi = [] // 样品收样位置
+          // let ypLiuYangWeiZhi = [] // 样品留样位置
+          // let saoMaNumList = [] // 扫码确认数量列表
+          // let jieYangQueRenZTList = [] // 接样状态列表
+
           let ypbhList = [] // 样品编号列表
+          // let mjypbList = [] // 明鉴样品表
+          // let mjypbWJ = [] // 明鉴样品表外键
+
+
 
           // 罗湖样品编号列表
           let lhypbhList = []
@@ -108,7 +113,6 @@ export default {
 
 
           for (let yp in ypInfoList) { //样品数据
-            let cfwzObj = []
             let cfwz = ''
             /*
               校验:
@@ -149,10 +153,10 @@ export default {
                 this_.$message.error("你要留样的话,存放位置不能为空哦!")
                 return;
               }
-              // if (ypInfoList[yp].shou_yang_wei_zhi != undefined && ypInfoList[yp].shou_yang_wei_zhi != '') {
-              //   this_.$message.error("你要留样的话,就不要选收样存放位置!")
-              //   return;
-              // }
+              if (ypInfoList[yp].shou_yang_wei_zhi != undefined && ypInfoList[yp].shou_yang_wei_zhi != '') {
+                this_.$message.error("你要留样的话,就不要选收样存放位置!")
+                return;
+              }
               if (ypInfoList[yp].liu_yang_ri_qi_ == null || ypInfoList[yp].liu_yang_ri_qi_ == '') {
                 this_.$message.error("留样时必须填写留样日期!")
                 return;
@@ -173,22 +177,20 @@ export default {
                 this_.$message.error("留样时必须填写销毁日期!")
                 return;
               }
-                // cfwz = ypInfoList[yp].liu_yang_wei_zhi_
-                cfwzObj.push(ypInfoList[yp].liu_yang_wei_zhi_)
-
-            } 
-            // else {
-            //   if (ypInfoList[yp].shou_yang_wei_zhi == null || ypInfoList[yp].shou_yang_wei_zhi == '') {
-            //     this_.$message.error("你正常收样的话,样品存放位置不能为空哦!")
-            //     return;
-            //   }
-            //   if (ypInfoList[yp].liu_yang_wei_zhi_ != undefined && ypInfoList[yp].liu_yang_wei_zhi_ != '') {
-            //     this_.$message.error("你正常收样的话,就不要选择留样存放位置!")
-            //     return;
-            //   }
-            //     cfwz = ypInfoList[yp].shou_yang_wei_zhi //取位置信息
-            // }
-            cfwzObj.push(ypInfoList[yp].shou_yang_wei_zhi) //取位置信息
+                cfwz = ypInfoList[yp].liu_yang_wei_zhi_
+
+            } else {
+              if (ypInfoList[yp].shou_yang_wei_zhi == null || ypInfoList[yp].shou_yang_wei_zhi == '') {
+                this_.$message.error("你正常收样的话,样品存放位置不能为空哦!")
+                return;
+              }
+              if (ypInfoList[yp].liu_yang_wei_zhi_ != undefined && ypInfoList[yp].liu_yang_wei_zhi_ != '') {
+                this_.$message.error("你正常收样的话,就不要选择留样存放位置!")
+                return;
+              }
+                cfwz = ypInfoList[yp].shou_yang_wei_zhi //取位置信息
+            }
+
 
             // uuidList.push(ypInfoList[yp].biao_zhi_uuid_)
             // ypIdList.push('{"id_":"' + ypInfoList[yp].id_ + '"}')
@@ -203,7 +205,7 @@ export default {
             // lhypbhList.push('{"yang_pin_bian_hao":"' + ypInfoList[yp].yang_pin_bian_hao + '"}')
             // lhypbWJ.push('{"id_":"' + ypInfoList[yp].parent_id_ + '"}')
             dWhere.push('{"id_":"' + cfwz + '"}')
-            cfwzIdList.push(cfwzObj)
+            cfwzIdList.push(cfwz)
             lhypbhList.push( ypInfoList[yp].yang_pin_bian_hao )
             lhypbWJ.push( ypInfoList[yp].parent_id_ )
             lhypIdList.push( ypInfoList[yp].id_ )
@@ -274,7 +276,7 @@ export default {
                     obj["nian_ling_"]         = res[i].nian_ling_
                     obj["yang_ben_zhuang_t"]  = res[i].yang_pin_zhuang_t
                     obj["shou_yang_ri_qi_"]   = this_.dateFormat()
-                    obj["bei_zhu_"]           = ypInfoList[i].bei_zhu_
+                    obj["bei_zhu_"]           = res[i].bei_zhu_
 
                     obj["yang_ben_lei_xing"] =    x==0? res[i].yang_pin_lei_xing : x==1? res[i].yang_pin_lei_er_ : x==2? res[i].yang_pin_lei_san_ : x==3? res[i].yang_pin_lei_si_ :''
                     obj["yun_shu_tiao_jian"] =    x==0? res[i].yang_ben_yun_shu_ : x==1? res[i].yang_pin_yun_shu_ : x==2? res[i].yang_pin_yun_san : x==3? res[i].yang_pin_yun_si_ :''
@@ -284,8 +286,12 @@ export default {
                     obj["cun_fang_wei_zhi_"] =       ypInfoList[i].shou_yang_wei_zhi
                     obj["liu_zhuan_zhuang_"] =       '待检'
                     obj["shi_fou_liu_yang_"] =       ypInfoList[i].shi_fou_liu_yang_
+                    // obj["shou_yang_ren_"] =          ypInfoList[i].
+                    // obj["jiao_yang_ri_qi_"] =        ypInfoList[i].
+                    // obj["jiao_yang_jyr"] =           ypInfoList[i].
+                    // obj["jiao_yang_shu_lia"] =       ypInfoList[i].
                     obj["liu_yang_ri_qi_"]    =       ypInfoList[i].liu_yang_ri_qi_
-                    obj["liu_yang_cun_fang"]  =      ypInfoList[i].liu_yang_wei_zhi_
+                    obj["liu_yang_cun_fang"]  =      ypInfoList[i].liu_yang_cun_fang
                     obj["liu_yang_shu_lian"]  =      ypInfoList[i].liu_yang_shu_lian
                     obj["liu_yang_qi_xian"]   =        ypInfoList[i].liu_yang_qi_xian
                     obj["xiao_hui_ri_qi_"]    =         ypInfoList[i].xiao_hui_ri_qi_
@@ -293,7 +299,6 @@ export default {
                     obj["fan_yang_jyr"]       =       ypInfoList[i].fan_yang_jyr
                     obj["biao_zhi_uuid_"]     =       ypInfoList[i].biao_zhi_uuid_
                     obj["song_yang_yao_qiu"]  =    ypInfoList[i].song_yang_yao_qiu
-                    // obj["fen_zhuang_liu_ya"]  =    ypInfoList[i].fen_zhuang_liu_ya
                     changeWeiZhi = ypInfoList[i].shou_yang_wei_zhi ==''?'':ypInfoList[i].shou_yang_wei_zhi
                     changesyWeiZhi = ypInfoList[i].liu_yang_cun_fang ==''?'':ypInfoList[i].liu_yang_cun_fang
                     ypdjb.push(obj)
@@ -306,9 +311,9 @@ export default {
               fbbIdStr = fbbIdStr.substring(0,fbbIdStr.length-1)
               // fbbIdStr = fbbIdStr.replace(/,/g,"','")
               // console.log('fbbIdStr :',fbbIdStr)
-              console.log('进入样品登记表...',ypdjb)
-              // repostCurd('add', '{"tableName":"t_lhypdjb","paramWhere":' + JSON.stringify(ypdjb) + '}')
-              // repostCurd('updates', '{"tableName":"t_lhypb","paramWhere":[' + lhypIdNewList + '],"paramCond":{"jie_yang_zhuang_t":"已接收"}}')
+              // console.log('进入样品登记表...',ypdjb)
+              repostCurd('add', '{"tableName":"t_lhypdjb","paramWhere":' + JSON.stringify(ypdjb) + '}')
+              repostCurd('updates', '{"tableName":"t_lhypb","paramWhere":[' + lhypIdNewList + '],"paramCond":{"jie_yang_zhuang_t":"已接收"}}')
               
               /*
                 更新委托单 如果本来没值,就更新 报告编制人和 报告审核员 否则更新
@@ -352,7 +357,7 @@ export default {
                // console.log('委托单id列表 ',lhwtbID)
                // console.log('展示表id列表 ',lhwtzsbID)
 
-              //  repostCurd('updates', '{"tableName":"t_lhwtsqb","paramWhere":[' + lhwtbID + '],"paramCond":{"wei_tuo_zhuang_ta":"已完成"}}')
+               repostCurd('updates', '{"tableName":"t_lhwtsqb","paramWhere":[' + lhwtbID + '],"paramCond":{"wei_tuo_zhuang_ta":"已完成"}}')
 
                let rws = []
               if(wtdAndYpb.length>0){
@@ -399,19 +404,18 @@ export default {
                          rw["bao_gao_lei_xing_"] = wtdAndYpb[i].bao_gao_lei_xing_   // 报告类型
                          rw["xin_xiang_mu_ming"] = wtdAndYpb[i].xiang_mu_ming_che   // 项目名称
                          rw["zhan_shi_biao_id_"] = wtdAndYpb[i].zhan_shi_biao_id_   // 展示表id
-                         rw["fen_zhuang_liu_ya"] = ypInfoList[i].liu_yang_shu_lian  // 留样数量
                          rws.push(rw)
                         // }
                   }
-                   console.log("任务分配",rws)
-                //  repostCurd('add', '{"tableName":"t_lhrwfpb","paramWhere":'+JSON.stringify(rws)+',"defKey":"Process_04o0csc","formKey":"lhrwfp"}')
+                   // console.log("任务分配",rws)
+                 repostCurd('add', '{"tableName":"t_lhrwfpb","paramWhere":'+JSON.stringify(rws)+',"defKey":"Process_04o0csc","formKey":"lhrwfp"}')
                 }
-                // 更新委托单 检测开始时间   问吴懿是否需要 不需要
+                // 更新委托单 检测开始时间   问吴懿是否需要
                 //repostCurd('updates', '{"tableName":"t_lhwtsqb","paramWhere":[' + lhwtbID + '],"paramCond":{"jian_ce_kai_shi_s":"' + this_.dateFormat() + '"}}')
 
                 //更新展示表
                 if(lhwtzsbID.length > 0){
-                  // repostCurd('updates', '{"tableName":"t_lhwtzsb","paramWhere":['+lhwtzsbID+'],"paramCond":{"zhuang_tai_":"任务分配进行中"}}')
+                  repostCurd('updates', '{"tableName":"t_lhwtzsb","paramWhere":['+lhwtzsbID+'],"paramCond":{"zhuang_tai_":"任务分配进行中"}}')
                 }
                 
 
@@ -428,72 +432,55 @@ export default {
                  repostCurd('updates', '{"tableName":"t_lhwtsqb","paramWhere":[' + lhwtbID + '],"paramCond":{"wei_tuo_zhuang_ta":"已完成"}}')
                  */
 
-          console.log('dwhere:',dWhere)
-          console.log('cfwzIdList:',cfwzIdList)
+
           /* 2、更新货架位置信息(位置状态、样品编号、入库时间)如果是重复位置,则新增一条位置记录,并增加对应UUID   */
           for (let num in dWhere) {
-              for(let index = 0; index<cfwzIdList[num].length; index++){
-                let sql = "select * from t_ypcfwz where id_ = '" + cfwzIdList[num][index] + "'"
-                console.log(sql)
-                  repostCurd('sql', sql).then(response => {
-                    let resArr = response.variables.data
-                    console.log(resArr)
-                    if (resArr.length == 1) {
-                      if (resArr[0].wei_zhi_zhuang_ta == "空余") {
-                        let paramCond = {
-                          wei_zhi_zhuang_ta:'占用',
-                          yang_pin_bian_hao:ypbh[num],
-                          yang_pin_ming_che:lhypmcList[num],
-                          ru_ku_shi_jian_:this_.dateFormat(),
+              let sql = "select * from t_ypcfwz where id_ = '" + cfwzIdList[num] + "'"
+              repostCurd('sql', sql).then(response => {
+                let resArr = response.variables.data
+                if (resArr.length == 1) {
+                  if (resArr[0].wei_zhi_zhuang_ta == "空余") {
+                    repostCurd('update', '{"tableName":"t_ypcfwz","paramWhere":' + dWhere[num] + ',"paramCond":' + '{"wei_zhi_zhuang_ta":"占用","yang_pin_bian_hao":"' + ypbh[num] +'","yang_pin_ming_che":"'  + lhypmcList[num] +'","ru_ku_shi_jian_":"' + this_.dateFormat() + '"}}').then(res => {
+                    })
+                  } else if (resArr[0].wei_zhi_zhuang_ta == "占用") {
+                    // 新增一条新的位置记录,使用旧的位置记录 修改它的样品编号,入库时间,标识UUID
+                    let cfNewList = []
+                    let cfNew = {}
+                    cfNew["fang_jian_lei_xin"] = resArr[0].fang_jian_lei_xin
+                    cfNew["wei_zhi_"] = resArr[0].wei_zhi_
+                    cfNew["qu_yu_"] = resArr[0].qu_yu_
+                    cfNew["huo_jia_lei_xing_"] = resArr[0].huo_jia_lei_xing_
+                    cfNew["huo_jia_hao_"] = resArr[0].huo_jia_hao_
+                    cfNew["ceng_hao_"] = resArr[0].ceng_hao_
+                    cfNew["shui_ping_fen_qu_"] = resArr[0].shui_ping_fen_qu_
+                    cfNew["wei_zhi_bian_hao_"] = resArr[0].wei_zhi_bian_hao_
+                    cfNew["wei_zhi_zhuang_ta"] = resArr[0].wei_zhi_zhuang_ta
+                    cfNew["cun_chu_tiao_jian"] = resArr[0].cun_chu_tiao_jian
+                    cfNew["yang_pin_bian_hao"] = ypbh[num]
+                    // cfNew["yang_pin_bian_hao"] = lhypIdList[num]
+                    cfNew["yang_pin_ming_che"] = lhypmcList[num]
+                    cfNew["ru_ku_shi_jian_"] = this_.dateFormat()
+                    cfNew["biao_zhi_uuid_"] = uuidList[num]
+                    cfNewList.push(cfNew)
+                    let uuid = cfNew["biao_zhi_uuid_"];
+
+                    repostCurd('add', '{"tableName":"t_ypcfwz","paramWhere":' + JSON.stringify(cfNewList) + '}').then(res => {
+                      let selectsql = "select id_ from t_ypcfwz where biao_zhi_uuid_='" + uuid + "'";
+                      repostCurd('sql', selectsql).then(res => {
+                        let dataid = res.variables.data[0].id_;
+                        let abc = '{"biao_zhi_uuid_":"' + uuid + '"}'
+                        // console.log('zzj abc ',abc)
+                        // console.log('zzj dataid ',dataid)
+                        if (changeWeiZhi && !changesyWeiZhi) {
+                          repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":' + abc + ',"paramCond":' + '{"cun_fang_wei_zhi_":"' + dataid + '"}}')
+                        } else {
+                          repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":' + abc + ',"paramCond":' + '{"liu_yang_cun_fang":"' + dataid + '"}}')
                         }
-                        let target = {
-                          tableName:'t_ypcfwz',
-                          paramWhere:'{"id_":"' + cfwzIdList[num][index] + '"}',
-                          paramCond:paramCond
-                        }
-                        console.log(target)
-                        // repostCurd('update', '{"tableName":"t_ypcfwz","paramWhere":' + dWhere[num] + ',"paramCond":' + '{"wei_zhi_zhuang_ta":"占用","yang_pin_bian_hao":"' + ypbh[num] +'","yang_pin_ming_che":"'  + lhypmcList[num] +'","ru_ku_shi_jian_":"' + this_.dateFormat() + '"}}').then(res => {
-                        // })
-                      } else if (resArr[0].wei_zhi_zhuang_ta == "占用") {
-                        // 新增一条新的位置记录,使用旧的位置记录 修改它的样品编号,入库时间,标识UUID
-                        let cfNewList = []
-                        let cfNew = {}
-                        cfNew["fang_jian_lei_xin"] = resArr[0].fang_jian_lei_xin
-                        cfNew["wei_zhi_"] = resArr[0].wei_zhi_
-                        cfNew["qu_yu_"] = resArr[0].qu_yu_
-                        cfNew["huo_jia_lei_xing_"] = resArr[0].huo_jia_lei_xing_
-                        cfNew["huo_jia_hao_"] = resArr[0].huo_jia_hao_
-                        cfNew["ceng_hao_"] = resArr[0].ceng_hao_
-                        cfNew["shui_ping_fen_qu_"] = resArr[0].shui_ping_fen_qu_
-                        cfNew["wei_zhi_bian_hao_"] = resArr[0].wei_zhi_bian_hao_
-                        cfNew["wei_zhi_zhuang_ta"] = resArr[0].wei_zhi_zhuang_ta
-                        cfNew["cun_chu_tiao_jian"] = resArr[0].cun_chu_tiao_jian
-                        cfNew["yang_pin_bian_hao"] = ypbh[num]
-                        // cfNew["yang_pin_bian_hao"] = lhypIdList[num]
-                        cfNew["yang_pin_ming_che"] = lhypmcList[num]
-                        cfNew["ru_ku_shi_jian_"] = this_.dateFormat()
-                        cfNew["biao_zhi_uuid_"] = uuidList[num]
-                        cfNewList.push(cfNew)
-                        let uuid = cfNew["biao_zhi_uuid_"];
-
-                        // repostCurd('add', '{"tableName":"t_ypcfwz","paramWhere":' + JSON.stringify(cfNewList) + '}').then(res => {
-                        //   let selectsql = "select id_ from t_ypcfwz where biao_zhi_uuid_='" + uuid + "'";
-                        //   repostCurd('sql', selectsql).then(res => {
-                        //     let dataid = res.variables.data[0].id_;
-                        //     let abc = '{"biao_zhi_uuid_":"' + uuid + '"}'
-                        //     // console.log('zzj abc ',abc)
-                        //     // console.log('zzj dataid ',dataid)
-                        //     if (changeWeiZhi && !changesyWeiZhi) {
-                        //       repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":' + abc + ',"paramCond":' + '{"cun_fang_wei_zhi_":"' + dataid + '"}}')
-                        //     } else {
-                        //       repostCurd('update', '{"tableName":"t_lhypdjb","paramWhere":' + abc + ',"paramCond":' + '{"liu_yang_cun_fang":"' + dataid + '"}}')
-                        //     }
-                        //   })
-                        // })
-                      }
-                    }
-                  })
-              }
+                      })
+                    })
+                  }
+                }
+              })
           }
           
           /*
@@ -507,6 +494,7 @@ export default {
                        jcxmArr.push(temp)
                      })
                    })
+
                    let allProject = []
                    let finalJCTask = []
                    let processDefKeyParam = []
@@ -546,6 +534,8 @@ export default {
                              processFormKeyParam.push(jcxmItem.formkey_)
                           })
                         })
+
+
                        finalJCTask.forEach((item,index )=>{
                          let obj = {
                            tableName:"t_lhjczb",
@@ -556,13 +546,17 @@ export default {
                        repostCurd('add', JSON.stringify(obj))
                        })
                    })
+
                    }
+
                })
+
               //更新展示表
               if(lhwtzsbID.length > 0){
                 repostCurd('updates', '{"tableName":"t_lhwtzsb","paramWhere":['+lhwtzsbID+'],"paramCond":{"zhuang_tai_":"检测进行中"}}')
               }
               */
+
           })
 
 

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio