Kaynağa Gözat

fix:检测档案

zhangjingyuan 3 yıl önce
ebeveyn
işleme
96db3f378d

+ 141 - 129
src/views/platform/bpmn/bpmInstHis/listType/CMAjiancedangan.vue

@@ -105,7 +105,7 @@
                     style="color: #85ce61; cursor: pointer"
                     v-for="it in itemInfo"
                     :key="it.id_"
-                    @click="formEvent(it.jian_ce_xiang_mu_)"
+                    @click="formEvent(it.id_,it.shujuid)"
                   >
                     {{ it.jian_ce_xiang_mu_ }}记录
                   </div>
@@ -215,6 +215,7 @@ export default {
       hetong: [],
       triggerType: "click",
       wTBH:[],
+      tongyonglujin:'',//检测项目通用路径
     };
   },
   filters: {
@@ -228,9 +229,9 @@ export default {
        returnweituobianhao(value, arr) {
       for (var i = 0; i < arr.length; i++) {
         if (arr[i] != null && arr[i] != undefined) {
-          console.log(arr[i].shen_qing_id_==value)
+          // console.log(arr[i].shen_qing_id_==value)
           if (arr[i].shen_qing_id_ == value) {
-            console.log(arr,arr[i].wei_tuo_bian_hao_ );
+            // console.log(arr,arr[i].wei_tuo_bian_hao_ );
             return arr[i].wei_tuo_bian_hao_;
           }
         }
@@ -251,13 +252,16 @@ export default {
     },
   },
   created() {
-    let sql =
-      "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA' and zhuang_tai_ = '报告待发放' or  zhuang_tai_ = '完成'  ORDER BY create_time_ DESC limit 0,20";
+    let this_= this;
+    let sql ="select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA' and zhuang_tai_ = '报告待发放' or  zhuang_tai_ = '完成'  ORDER BY create_time_ DESC limit 0,20";
     this.loadData(sql);
-    let sumsql =
-      "select COUNT(*) AS sum  FROM t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA' and zhuang_tai_ ='报告待发放' or  zhuang_tai_ = '已完成'";
+    let sumsql ="select COUNT(*) AS sum  FROM t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA' and zhuang_tai_ ='报告待发放' or  zhuang_tai_ = '完成'";
     curdPost("sql", sumsql).then((response) => {
-      this.total = response.variables.data[0].sum;
+      this_.total = response.variables.data[0].sum;
+    });
+    let sql2 ="select id_,yuan_shi_ji_lu_ba FROM t_mjjcnlfw WHERE id_ ='f5a95b425d444b549d5a217d4c031855'";
+    curdPost("sql", sql2).then((response) => {
+      this_.tongyonglujin = response.variables.data[0].yuan_shi_ji_lu_ba;
     });
   },
   methods: {
@@ -301,20 +305,18 @@ export default {
     juTiItem(info) {
       let itemId;
       let this_ = this;
-      var sql =
-        "select b.id_ ,c.jian_ce_xiang_mu2 FROM t_mjjcbg a JOIN t_jchzb b ON a.jian_ce_shen_qing = b.shen_qing_dan_id_ JOIN t_mjypb c ON a.jian_ce_shen_qing = c.wai_jian_ WHERE a.id_ = '" +
-        info.id_ +
-        "'";
+      this.runqianId = "";
+      this_.itemInfo =[];
+      var sql =`select jian_ce_xiang_mu2,jian_ce_xiang_si_ ,jian_ce_xiang_me_ ,jian_ce_xiang_ms_  FROM t_mjypb  WHERE  wai_jian_= (SELECT jian_ce_shen_qing  FROM t_mjjcbg  WHERE id_= '${info.id_}') AND yang_pin_bian_hao = '${info.yang_pin_bian_hao}'`;
       curdPost("sql", sql).then((res) => {
         itemId = res.variables.data;
-        this_.runqianId = itemId[0].id_;
-        var itemSql =
-          "select id_,jian_ce_xiang_mu_ FROM t_mjjcnlfw WHERE id_ IN(" +
-          itemId[0].jian_ce_xiang_mu2 +
-          ")";
+        this_.runqianId = itemId[0].jian_ce_xiang_mu2+','+itemId[0].jian_ce_xiang_si_+','+itemId[0].jian_ce_xiang_me_+','+itemId[0].jian_ce_xiang_ms_;
+        console.log(this_.runqianId)
+        var itemSql =`select a.id_,a.jian_ce_xiang_mu_ ,b.id_ as shujuid FROM t_mjjcnlfw AS a JOIN t_jchzb AS b  ON a.id_ = b.jian_ce_xiang_mu_ WHERE b.yang_pin_bian_hao = '${info.yang_pin_bian_hao}'`;
         curdPost("sql", itemSql).then((res) => {
           this_.itemInfo = res.variables.data;
         });
+
       });
     },
     YubaogaoItem(info) {
@@ -351,115 +353,125 @@ export default {
       console.log(id, "检测委托单id");
       this.alertReport(url, id);
     },
-    formEvent(itemName) {
-      if (itemName.includes("pH检测")) {
-        this.alertReport(
-          "42明鉴/郑/MJT-SJ-103-R01 A1 pH检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("渗透压摩尔浓度检测")) {
-        this.alertReport(
-          "42明鉴/郑/MJT-SJ-105-R01 A2 渗透压摩尔浓度检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("最低装量")) {
-        this.alertReport("42明鉴/张/最低装载量.rpx", this.runqianId);
-      } else if (itemName.includes("无菌检测(薄膜过滤法)")) {
-        this.alertReport(
-          "42明鉴/林/MJT-SJ-102-R01 A2 无菌检测薄膜过滤法记录表.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("无菌检测(全自动微生物培养)")) {
-        this.alertReport(
-          "42明鉴/柯/无菌检测(全自动微生物培养).rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("内毒素检测(凝胶法)")) {
-        this.alertReport(
-          "42明鉴/卢/MJT-SJ-117-R01 A1 细菌内毒素(凝胶法)检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("内毒素检测(动态显色法)")) {
-        this.alertReport(
-          "42明鉴/张/动态显色法检测内毒素记录表.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("手动细胞计数")) {
-        this.alertReport(
-          "42明鉴/林/MJT-SJ-106-R01 A1 细胞计数检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("手动细胞活率")) {
-        this.alertReport(
-          "42明鉴/张/MJT-SJ-107-R01 A1 细胞活率检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("自动细胞计数和活率(台盼蓝染色法)")) {
-        this.alertReport(
-          "42明鉴/郑/MJT-SJ-118-R01  A0细胞计数和细胞活率(台盼蓝仪器法)检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("自动细胞计数和活率(双荧光染色法)")) {
-        this.alertReport(
-          "42明鉴/郑/MJT-SJ-119-R01  A0细胞计数和细胞活率(双荧光染色法)检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("牛血清白蛋白残留检测")) {
-        this.alertReport(
-          "42明鉴/张/MJT-SJ-111-R01 A1 牛血清白蛋白残留量检测.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("青霉素残留检测")) {
-        this.alertReport(
-          "42明鉴/张/青霉素残留量检测记录表.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("支原体检测(培养法)")) {
-        this.alertReport(
-          "42明鉴/卢/MJT-SJ-104-R01 A1 支原体检测培养法记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("支原体检测(荧光PCR法)")) {
-        this.alertReport(
-          "42明鉴/卢/MJT-SJ-113-R01 A1支原体检测(荧光PCR法) 副本.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("间充质干细胞表型检测3项")) {
-        this.alertReport(
-          "42明鉴/柯/间充质干细胞表型检测3项.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("间充质干细胞表型检测5项")) {
-        this.alertReport(
-          "42明鉴/柯/间充质干细胞表型检测5项.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("间充质干细胞表型检测8项")) {
-        this.alertReport(
-          "42明鉴/柯/间充质干细胞表型检测8项.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("CIK细胞表型检测")) {
-        this.alertReport(
-          "42明鉴/林/MJT-SJ-123-R01 A0 CIK细胞表面标志物检测记录表.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("NK细胞表型检测")) {
-        this.alertReport(
-          "42明鉴/恰/MJT-SJ-124-R01  A0 NK细胞表面标志物检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("淋巴细胞表型检测")) {
-        this.alertReport(
-          "42明鉴/张/MJT-SJ-125-R01 A0 淋巴细胞表面标志物检测记录表.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("支原体检测(化学发光法)记录表")) {
-        this.alertReport(
-          "42明鉴/林/MJT-SJ-114-R01 A1 支原体检测(化学发光法)记录表.rpx",
-          this.runqianId
-        );
-      }
+    formEvent(itemId,shujuid) {
+      console.log(itemId,shujuid)
+      var itemSql =`select id_,jian_ce_xiang_mu_,yuan_shi_ji_lu_ba FROM t_mjjcnlfw`;
+        curdPost("sql", itemSql).then((res) => {
+          let data = res.variables.data;
+          data.forEach(item=>{
+            if(item.id_ ==itemId){
+              this.alertReport(item.yuan_shi_ji_lu_ba?item.yuan_shi_ji_lu_ba:this_.tongyonglujin,shujuid);
+            }
+          })
+        });
+      // if (itemName.includes("pH检测")) {
+      //   this.alertReport(
+      //     "42明鉴/郑/MJT-SJ-103-R01 A1 pH检测记录.rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("渗透压摩尔浓度检测")) {
+      //   this.alertReport(
+      //     "42明鉴/郑/MJT-SJ-105-R01 A2 渗透压摩尔浓度检测记录.rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("最低装量")) {
+      //   this.alertReport("42明鉴/张/最低装载量.rpx", shujuid);
+      // } else if (itemName.includes("无菌检测(薄膜过滤法)")) {
+      //   this.alertReport(
+      //     "42明鉴/林/MJT-SJ-102-R01 A2 无菌检测薄膜过滤法记录表.rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("无菌检测(全自动微生物培养)")) {
+      //   this.alertReport(
+      //     "42明鉴/柯/无菌检测(全自动微生物培养).rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("内毒素检测(凝胶法)")) {
+      //   this.alertReport(
+      //     "42明鉴/卢/MJT-SJ-117-R01 A1 细菌内毒素(凝胶法)检测记录.rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("动态显色法")) {
+      //   this.alertReport(
+      //     "42明鉴/张/动态显色法检测内毒素记录表.rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("手动细胞计数")) {
+      //   this.alertReport(
+      //     "42明鉴/林/MJT-SJ-106-R01 A1 细胞计数检测记录.rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("手动细胞活率")) {
+      //   this.alertReport(
+      //     "42明鉴/张/MJT-SJ-107-R01 A1 细胞活率检测记录.rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("自动细胞计数和活率(台盼蓝染色法)")) {
+      //   this.alertReport(
+      //     "42明鉴/郑/MJT-SJ-118-R01  A0细胞计数和细胞活率(台盼蓝仪器法)检测记录.rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("自动细胞计数和活率(双荧光染色法)")) {
+      //   this.alertReport(
+      //     "42明鉴/郑/MJT-SJ-119-R01  A0细胞计数和细胞活率(双荧光染色法)检测记录.rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("牛血清白蛋白残留检测")) {
+      //   this.alertReport(
+      //     "42明鉴/张/MJT-SJ-111-R01 A1 牛血清白蛋白残留量检测.rpx",
+      //     '0c5c64b2083f43daa73d47bc1928d3ee'
+      //   );
+      // } else if (itemName.includes("青霉素残留检测")) {
+      //   this.alertReport(
+      //     "42明鉴/张/青霉素残留量检测记录表.rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("支原体检测(培养法)")) {
+      //   this.alertReport(
+      //     "42明鉴/卢/MJT-SJ-104-R01 A1 支原体检测培养法记录.rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("支原体检测(荧光PCR法)")) {
+      //   this.alertReport(
+      //     "42明鉴/卢/MJT-SJ-113-R01 A1支原体检测(荧光PCR法) 副本.rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("间充质干细胞表型检测3项")) {
+      //   this.alertReport(
+      //     "42明鉴/柯/间充质干细胞表型检测3项.rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("间充质干细胞表型检测5项")) {
+      //   this.alertReport(
+      //     "42明鉴/柯/间充质干细胞表型检测5项.rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("间充质干细胞表型检测8项")) {
+      //   this.alertReport(
+      //     "42明鉴/柯/间充质干细胞表型检测8项.rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("CIK细胞表型检测")) {
+      //   this.alertReport(
+      //     "42明鉴/林/MJT-SJ-123-R01 A0 CIK细胞表面标志物检测记录表.rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("NK细胞表型检测")) {
+      //   this.alertReport(
+      //     "42明鉴/恰/MJT-SJ-124-R01  A0 NK细胞表面标志物检测记录.rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("淋巴细胞表型检测")) {
+      //   this.alertReport(
+      //     "42明鉴/张/MJT-SJ-125-R01 A0 淋巴细胞表面标志物检测记录表.rpx",
+      //     shujuid
+      //   );
+      // } else if (itemName.includes("支原体检测(化学发光法)记录表")) {
+      //   this.alertReport(
+      //     "42明鉴/林/MJT-SJ-114-R01 A1 支原体检测(化学发光法)记录表.rpx",
+      //     shujuid
+      //   );
+      // }
     },
     selectSplit() {
       // pin凑sql
@@ -496,19 +508,19 @@ export default {
       var sql =
         "select * from t_mjjcbg " +
         moreSql +
-        " shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu = 'cnas/CMA' and zhuang_tai_ = '报告待发放' or  zhuang_tai_ = '完成' ORDER BY create_time_ DESC limit 0,20";
+        " shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu = 'cnas/CMA' and zhuang_tai_ = '报告待发放' or  zhuang_tai_ = '完成' ORDER BY create_time_ DESC limit 0,20";
       this.loadData(sql);
     },
     handleSizeChange(value) {
       this.currentPage4 = 1;
       let sql =
-        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA' and zhuang_tai_ = '报告待发放' or  zhuang_tai_ = '完成' ORDER BY create_time_ DESC limit 0," +
+        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA' and zhuang_tai_ = '报告待发放' or  zhuang_tai_ = '完成' ORDER BY create_time_ DESC limit 0," +
         value;
       this.loadData(sql);
     },
     handleCurrentChange(value) {
       let sql =
-        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA'  and zhuang_tai_ = '报告待发放' or  zhuang_tai_ = '完成' ORDER BY create_time_ DESC limit " +
+        "select * from t_mjjcbg WHERE shi_fou_yu_bao_ga='否' and lei_bie_qu_fen_yu ='cnas/CMA'  and zhuang_tai_ = '报告待发放' or  zhuang_tai_ = '完成' ORDER BY create_time_ DESC limit " +
         value +
         ", 20";
       this.loadData(sql);

+ 167 - 153
src/views/platform/bpmn/bpmInstHis/listType/CNASjiancedangan.vue

@@ -104,7 +104,7 @@
                     style="color: #85ce61; cursor: pointer"
                     v-for="it in itemInfo"
                     :key="it.id_"
-                    @click="formEvent(it.jian_ce_xiang_mu_)"
+                    @click="formEvent(it.id_,it.shujuid)"
                   >
                     {{ it.jian_ce_xiang_mu_ }}记录
                   </div>
@@ -118,7 +118,7 @@
             >
               <i class="el-icon-s-order"></i> 检测报告审批表
             </div>
-            <div v-if="false">
+            <!-- <div v-if="false">
               <el-popover placement="left" width="200" trigger="triggerType">
                 <div
                   class="div_test item"
@@ -139,7 +139,7 @@
                   </div>
                 </div>
               </el-popover>
-            </div>
+            </div> -->
             <div
               class="item"
               style="color: #85ce61"
@@ -214,6 +214,7 @@ export default {
       hetong: [],
       triggerType: "click",
       wTBH: [],
+      tongyonglujin:'',
     };
   },
   filters: {
@@ -227,9 +228,7 @@ export default {
    returnweituobianhao(value, arr) {
       for (var i = 0; i < arr.length; i++) {
         if (arr[i] != null && arr[i] != undefined) {
-          console.log(arr[i].shen_qing_id_==value)
           if (arr[i].shen_qing_id_ == value) {
-            console.log(arr,arr[i].wei_tuo_bian_hao_ );
             return arr[i].wei_tuo_bian_hao_;
           }
         }
@@ -259,6 +258,10 @@ export default {
     curdPost("sql", sumsql).then((response) => {
       this.total = response.variables.data[0].sum;
     });
+    let sql2 ="select id_,yuan_shi_ji_lu_ba FROM t_mjjcnlfw WHERE id_ ='f5a95b425d444b549d5a217d4c031855'";
+    curdPost("sql", sql2).then((response) => {
+      this_.tongyonglujin = response.variables.data[0].yuan_shi_ji_lu_ba;
+    });
   },
   methods: {
     // 请求表格数据函数
@@ -301,164 +304,175 @@ export default {
     juTiItem(info) {
       let itemId;
       let this_ = this;
-      var sql =
-        "select b.id_ ,c.jian_ce_xiang_mu2 FROM t_mjjcbg a JOIN t_jchzb b ON a.jian_ce_shen_qing = b.shen_qing_dan_id_ JOIN t_mjypb c ON a.jian_ce_shen_qing = c.wai_jian_ WHERE a.id_ = '" +
-        info.id_ +
-        "'";
-      curdPost("sql", sql).then((res) => {
-        itemId = res.variables.data;
-        this_.runqianId = itemId[0].id_;
-        var itemSql =
-          "select * FROM t_mjjcnlfw WHERE id_ IN(" +
-          itemId[0].jian_ce_xiang_mu2 +
-          ")";
-        curdPost("sql", itemSql).then((res) => {
-          this_.itemInfo = res.variables.data;
-        });
-      });
-    },
-    YubaogaoItem(info) {
-      let itemId;
-      let this_ = this;
-      var sql =
-        "select b.id_ ,c.jian_ce_xiang_mu2 FROM t_mjjcbg a JOIN t_jchzb b ON a.jian_ce_shen_qing = b.shen_qing_dan_id_ JOIN t_mjypb c ON a.jian_ce_shen_qing = c.wai_jian_ WHERE a.id_ = '" +
-        info.id_ +
-        "'";
+      this.runqianId = "";
+      this_.itemInfo =[];
+      var sql =`select jian_ce_xiang_mu2,jian_ce_xiang_si_ ,jian_ce_xiang_me_ ,jian_ce_xiang_ms_  FROM t_mjypb  WHERE  wai_jian_= (SELECT jian_ce_shen_qing  FROM t_mjjcbg  WHERE id_= '${info.id_}') AND yang_pin_bian_hao = '${info.yang_pin_bian_hao}'`;
       curdPost("sql", sql).then((res) => {
         itemId = res.variables.data;
-        this_.runqianId = itemId[0].id_;
-        var itemSql =
-          "select * FROM t_mjjcnlfw WHERE id_ IN(" +
-          itemId[0].jian_ce_xiang_mu2 +
-          ")";
+        console.log(itemId,"2323")
+        if(itemId.length <=0 ||itemId ==null){
+          return
+        }
+        this_.runqianId = itemId[0].jian_ce_xiang_mu2+','+itemId[0].jian_ce_xiang_si_+','+itemId[0].jian_ce_xiang_me_+','+itemId[0].jian_ce_xiang_ms_;
+        var itemSql =`select a.id_,a.jian_ce_xiang_mu_ ,b.id_ as shujuid FROM t_mjjcnlfw AS a JOIN t_jchzb AS b  ON a.id_ = b.jian_ce_xiang_mu_ WHERE b.yang_pin_bian_hao = '${info.yang_pin_bian_hao}'`;
         curdPost("sql", itemSql).then((res) => {
           this_.itemInfo = res.variables.data;
-          for (var i = 0; i++; i < this_itemInfo) {
-            if (this_itemInfo[i].shi_fou_yu_bao_ga == "是") {
-              this_.yubaogaoitem.push(it);
-            }
-          }
-          if (this_.yubaogaoitem.length == 0) {
-            this_.triggerType = "";
-            alert("此条报告没有预报告记录");
-            return;
-          }
         });
+
       });
     },
+    // YubaogaoItem(info) { 保留
+    //   let itemId;
+    //   let this_ = this;
+    //   var sql =
+    //     "select b.id_ ,c.jian_ce_xiang_mu2 FROM t_mjjcbg a JOIN t_jchzb b ON a.jian_ce_shen_qing = b.shen_qing_dan_id_ JOIN t_mjypb c ON a.jian_ce_shen_qing = c.wai_jian_ WHERE a.id_ = '" +
+    //     info.id_ +
+    //     "'";
+    //   curdPost("sql", sql).then((res) => {
+    //     itemId = res.variables.data;
+    //     this_.runqianId = itemId[0].id_;
+    //     var itemSql =
+    //       "select * FROM t_mjjcnlfw WHERE id_ IN(" +
+    //       itemId[0].jian_ce_xiang_mu2 +
+    //       ")";
+    //     curdPost("sql", itemSql).then((res) => {
+    //       this_.itemInfo = res.variables.data;
+    //       for (var i = 0; i++; i < this_itemInfo) {
+    //         if (this_itemInfo[i].shi_fou_yu_bao_ga == "是") {
+    //           this_.yubaogaoitem.push(it);
+    //         }
+    //       }
+    //       if (this_.yubaogaoitem.length == 0) {
+    //         this_.triggerType = "";
+    //         alert("此条报告没有预报告记录");
+    //         return;
+    //       }
+    //     });
+    //   });
+    // },
     yuReports(url, id) {
-      console.log(url, id);
       this.alertReport(url, id);
     },
-    formEvent(itemName) {
-      if (itemName.includes("pH检测")) {
-        this.alertReport(
-          "42明鉴/郑/MJT-SJ-103-R01 A1 pH检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("渗透压摩尔浓度检测")) {
-        this.alertReport(
-          "42明鉴/郑/MJT-SJ-105-R01 A2 渗透压摩尔浓度检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("最低装量")) {
-        this.alertReport("42明鉴/张/最低装载量.rpx", this.runqianId);
-      } else if (itemName.includes("无菌检测(薄膜过滤法)")) {
-        this.alertReport(
-          "42明鉴/林/MJT-SJ-102-R01 A2 无菌检测薄膜过滤法记录表.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("无菌检测(全自动微生物培养)")) {
-        this.alertReport(
-          "42明鉴/柯/无菌检测(全自动微生物培养).rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("内毒素检测(凝胶法)")) {
-        this.alertReport(
-          "42明鉴/卢/MJT-SJ-117-R01 A1 细菌内毒素(凝胶法)检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("内毒素检测(动态显色法)")) {
-        this.alertReport(
-          "42明鉴/张/动态显色法检测内毒素记录表.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("手动细胞计数")) {
-        this.alertReport(
-          "42明鉴/林/MJT-SJ-106-R01 A1 细胞计数检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("手动细胞活率")) {
-        this.alertReport(
-          "42明鉴/张/MJT-SJ-107-R01 A1 细胞活率检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("自动细胞计数和活率(台盼蓝染色法)")) {
-        this.alertReport(
-          "42明鉴/郑/MJT-SJ-118-R01  A0细胞计数和细胞活率(台盼蓝仪器法)检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("自动细胞计数和活率(双荧光染色法)")) {
-        this.alertReport(
-          "42明鉴/郑/MJT-SJ-119-R01  A0细胞计数和细胞活率(双荧光染色法)检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("牛血清白蛋白残留检测")) {
-        this.alertReport(
-          "42明鉴/张/MJT-SJ-111-R01 A1 牛血清白蛋白残留量检测.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("青霉素残留检测")) {
-        this.alertReport(
-          "42明鉴/张/青霉素残留量检测记录表.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("支原体检测(培养法)")) {
-        this.alertReport(
-          "42明鉴/卢/MJT-SJ-104-R01 A1 支原体检测培养法记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("支原体检测(荧光PCR法)")) {
-        this.alertReport(
-          "42明鉴/卢/MJT-SJ-113-R01 A1支原体检测(荧光PCR法) 副本.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("间充质干细胞表型检测3项")) {
-        this.alertReport(
-          "42明鉴/柯/间充质干细胞表型检测3项.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("间充质干细胞表型检测5项")) {
-        this.alertReport(
-          "42明鉴/柯/间充质干细胞表型检测5项.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("间充质干细胞表型检测8项")) {
-        this.alertReport(
-          "42明鉴/柯/间充质干细胞表型检测8项.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("CIK细胞表型检测")) {
-        this.alertReport(
-          "42明鉴/林/MJT-SJ-123-R01 A0 CIK细胞表面标志物检测记录表.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("NK细胞表型检测")) {
-        this.alertReport(
-          "42明鉴/恰/MJT-SJ-124-R01  A0 NK细胞表面标志物检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("淋巴细胞表型检测")) {
-        this.alertReport(
-          "42明鉴/张/MJT-SJ-125-R01 A0 淋巴细胞表面标志物检测记录表.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("支原体检测(化学发光法)记录表")) {
-        this.alertReport(
-          "42明鉴/林/MJT-SJ-114-R01 A1 支原体检测(化学发光法)记录表.rpx",
-          this.runqianId
-        );
-      }
+    formEvent(itemId,shujuid) {
+      var itemSql =`select id_,jian_ce_xiang_mu_,yuan_shi_ji_lu_ba FROM t_mjjcnlfw`;
+        curdPost("sql", itemSql).then((res) => {
+          let data = res.variables.data;
+          data.forEach(item=>{
+            if(item.id_ ==itemId){
+              this.alertReport(item.yuan_shi_ji_lu_ba?item.yuan_shi_ji_lu_ba:this_.tongyonglujin,shujuid);
+            }
+          })
+        });
+
+
+      // if (itemName.includes("pH检测")) {
+      //   this.alertReport(
+      //     "42明鉴/郑/MJT-SJ-103-R01 A1 pH检测记录.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("渗透压摩尔浓度检测")) {
+      //   this.alertReport(
+      //     "42明鉴/郑/MJT-SJ-105-R01 A2 渗透压摩尔浓度检测记录.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("最低装量")) {
+      //   this.alertReport("42明鉴/张/最低装载量.rpx", this.runqianId);
+      // } else if (itemName.includes("无菌检测(薄膜过滤法)")) {
+      //   this.alertReport(
+      //     "42明鉴/林/MJT-SJ-102-R01 A2 无菌检测薄膜过滤法记录表.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("无菌检测(全自动微生物培养)")) {
+      //   this.alertReport(
+      //     "42明鉴/柯/无菌检测(全自动微生物培养).rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("内毒素检测(凝胶法)")) {
+      //   this.alertReport(
+      //     "42明鉴/卢/MJT-SJ-117-R01 A1 细菌内毒素(凝胶法)检测记录.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("内毒素检测(动态显色法)")) {
+      //   this.alertReport(
+      //     "42明鉴/张/动态显色法检测内毒素记录表.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("手动细胞计数")) {
+      //   this.alertReport(
+      //     "42明鉴/林/MJT-SJ-106-R01 A1 细胞计数检测记录.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("手动细胞活率")) {
+      //   this.alertReport(
+      //     "42明鉴/张/MJT-SJ-107-R01 A1 细胞活率检测记录.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("自动细胞计数和活率(台盼蓝染色法)")) {
+      //   this.alertReport(
+      //     "42明鉴/郑/MJT-SJ-118-R01  A0细胞计数和细胞活率(台盼蓝仪器法)检测记录.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("自动细胞计数和活率(双荧光染色法)")) {
+      //   this.alertReport(
+      //     "42明鉴/郑/MJT-SJ-119-R01  A0细胞计数和细胞活率(双荧光染色法)检测记录.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("牛血清白蛋白残留检测")) {
+      //   this.alertReport(
+      //     "42明鉴/张/MJT-SJ-111-R01 A1 牛血清白蛋白残留量检测.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("青霉素残留检测")) {
+      //   this.alertReport(
+      //     "42明鉴/张/青霉素残留量检测记录表.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("支原体检测(培养法)")) {
+      //   this.alertReport(
+      //     "42明鉴/卢/MJT-SJ-104-R01 A1 支原体检测培养法记录.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("支原体检测(荧光PCR法)")) {
+      //   this.alertReport(
+      //     "42明鉴/卢/MJT-SJ-113-R01 A1支原体检测(荧光PCR法) 副本.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("间充质干细胞表型检测3项")) {
+      //   this.alertReport(
+      //     "42明鉴/柯/间充质干细胞表型检测3项.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("间充质干细胞表型检测5项")) {
+      //   this.alertReport(
+      //     "42明鉴/柯/间充质干细胞表型检测5项.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("间充质干细胞表型检测8项")) {
+      //   this.alertReport(
+      //     "42明鉴/柯/间充质干细胞表型检测8项.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("CIK细胞表型检测")) {
+      //   this.alertReport(
+      //     "42明鉴/林/MJT-SJ-123-R01 A0 CIK细胞表面标志物检测记录表.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("NK细胞表型检测")) {
+      //   this.alertReport(
+      //     "42明鉴/恰/MJT-SJ-124-R01  A0 NK细胞表面标志物检测记录.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("淋巴细胞表型检测")) {
+      //   this.alertReport(
+      //     "42明鉴/张/MJT-SJ-125-R01 A0 淋巴细胞表面标志物检测记录表.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("支原体检测(化学发光法)记录表")) {
+      //   this.alertReport(
+      //     "42明鉴/林/MJT-SJ-114-R01 A1 支原体检测(化学发光法)记录表.rpx",
+      //     this.runqianId
+      //   );
+      // }
     },
     isYubaogao(value, row) {},
     // pin凑sql

+ 153 - 121
src/views/platform/bpmn/bpmInstHis/listType/feijiancedangan.vue

@@ -107,7 +107,7 @@
                     style="color: #85ce61; cursor: pointer"
                     v-for="it in itemInfo"
                     :key="it.id_"
-                    @click="formEvent(it.jian_ce_xiang_mu_)"
+                    @click="formEvent(it.id_,it.shujuid)"
                   >
                     {{ it.jian_ce_xiang_mu_ }}记录
                   </div>
@@ -216,6 +216,7 @@ export default {
       hetong: [],
       triggerType: "click",
       wTBH: [],
+      tongyonglujin:'',//检测项目通用路径
     };
   },
   mixins: [GetReport],
@@ -230,9 +231,7 @@ export default {
     returnweituobianhao(value, arr) {
       for (var i = 0; i < arr.length; i++) {
         if (arr[i] != null && arr[i] != undefined) {
-          console.log(arr[i].shen_qing_id_ == value);
           if (arr[i].shen_qing_id_ == value) {
-            console.log(arr, arr[i].wei_tuo_bian_hao_);
             return arr[i].wei_tuo_bian_hao_;
           }
         }
@@ -264,6 +263,10 @@ export default {
     curdPost("sql", sumsql).then((response) => {
       this.total = response.variables.data[0].sum;
     });
+    let sql2 ="select id_,yuan_shi_ji_lu_ba FROM t_mjjcnlfw WHERE id_ ='f5a95b425d444b549d5a217d4c031855'";
+    curdPost("sql", sql2).then((response) => {
+      this_.tongyonglujin = response.variables.data[0].yuan_shi_ji_lu_ba;
+    });
   },
   methods: {
     // 请求表格数据函数
@@ -306,131 +309,160 @@ export default {
     juTiItem(info) {
       let itemId;
       let this_ = this;
-      var sql =
-        "select b.id_ ,c.jian_ce_xiang_mu2 FROM t_mjjcbg a JOIN t_jchzb b ON a.jian_ce_shen_qing = b.shen_qing_dan_id_ JOIN t_mjypb c ON a.jian_ce_shen_qing = c.wai_jian_ WHERE a.id_ = '" +
-        info.id_ +
-        "'";
+      this.runqianId = "";
+      this_.itemInfo =[];
+      var sql =`select jian_ce_xiang_mu2,jian_ce_xiang_si_ ,jian_ce_xiang_me_ ,jian_ce_xiang_ms_  FROM t_mjypb  WHERE  wai_jian_= (SELECT jian_ce_shen_qing  FROM t_mjjcbg  WHERE id_= '${info.id_}') AND yang_pin_bian_hao = '${info.yang_pin_bian_hao}'`;
       curdPost("sql", sql).then((res) => {
+        console.log(sql)
         itemId = res.variables.data;
-        this_.runqianId = itemId[0].id_;
-        var itemSql =
-          "select id_,jian_ce_xiang_mu_ FROM t_mjjcnlfw WHERE id_ IN(" +
-          itemId[0].jian_ce_xiang_mu2 +
-          ")";
+        if(itemId.length <=0 ||itemId ==null){
+          return
+        }
+        this_.runqianId = itemId[0].jian_ce_xiang_mu2+','+itemId[0].jian_ce_xiang_si_+','+itemId[0].jian_ce_xiang_me_+','+itemId[0].jian_ce_xiang_ms_;
+        var itemSql =`select a.id_,a.jian_ce_xiang_mu_ ,b.id_ as shujuid FROM t_mjjcnlfw AS a JOIN t_jchzb AS b  ON a.id_ = b.jian_ce_xiang_mu_ WHERE b.yang_pin_bian_hao = '${info.yang_pin_bian_hao}'`;
         curdPost("sql", itemSql).then((res) => {
           this_.itemInfo = res.variables.data;
         });
+
       });
     },
-    formEvent(itemName) {
-      if (itemName.includes("pH检测")) {
-        this.alertReport(
-          "42明鉴/郑/MJT-SJ-103-R01 A1 pH检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("渗透压摩尔浓度检测")) {
-        this.alertReport(
-          "42明鉴/郑/MJT-SJ-105-R01 A2 渗透压摩尔浓度检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("最低装量")) {
-        this.alertReport("42明鉴/张/最低装载量.rpx", this.runqianId);
-      } else if (itemName.includes("无菌检测(薄膜过滤法)")) {
-        this.alertReport(
-          "42明鉴/林/MJT-SJ-102-R01 A2 无菌检测薄膜过滤法记录表.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("无菌检测(全自动微生物培养)")) {
-        this.alertReport(
-          "42明鉴/柯/无菌检测(全自动微生物培养).rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("内毒素检测(凝胶法)")) {
-        this.alertReport(
-          "42明鉴/卢/MJT-SJ-117-R01 A1 细菌内毒素(凝胶法)检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("内毒素检测(动态显色法)")) {
-        this.alertReport(
-          "42明鉴/张/动态显色法检测内毒素记录表.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("手动细胞计数")) {
-        this.alertReport(
-          "42明鉴/林/MJT-SJ-106-R01 A1 细胞计数检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("手动细胞活率")) {
-        this.alertReport(
-          "42明鉴/张/MJT-SJ-107-R01 A1 细胞活率检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("自动细胞计数和活率(台盼蓝染色法)")) {
-        this.alertReport(
-          "42明鉴/郑/MJT-SJ-118-R01  A0细胞计数和细胞活率(台盼蓝仪器法)检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("自动细胞计数和活率(双荧光染色法)")) {
-        this.alertReport(
-          "42明鉴/郑/MJT-SJ-119-R01  A0细胞计数和细胞活率(双荧光染色法)检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("牛血清白蛋白残留检测")) {
-        this.alertReport(
-          "42明鉴/张/MJT-SJ-111-R01 A1 牛血清白蛋白残留量检测.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("青霉素残留检测")) {
-        this.alertReport(
-          "42明鉴/张/青霉素残留量检测记录表.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("支原体检测(培养法)")) {
-        this.alertReport(
-          "42明鉴/卢/MJT-SJ-104-R01 A1 支原体检测培养法记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("支原体检测(荧光PCR法)")) {
-        this.alertReport(
-          "42明鉴/卢/MJT-SJ-113-R01 A1支原体检测(荧光PCR法) 副本.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("间充质干细胞表型检测3项")) {
-        this.alertReport(
-          "42明鉴/柯/间充质干细胞表型检测3项.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("间充质干细胞表型检测5项")) {
-        this.alertReport(
-          "42明鉴/柯/间充质干细胞表型检测5项.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("间充质干细胞表型检测8项")) {
-        this.alertReport(
-          "42明鉴/柯/间充质干细胞表型检测8项.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("CIK细胞表型检测")) {
-        this.alertReport(
-          "42明鉴/林/MJT-SJ-123-R01 A0 CIK细胞表面标志物检测记录表.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("NK细胞表型检测")) {
-        this.alertReport(
-          "42明鉴/恰/MJT-SJ-124-R01  A0 NK细胞表面标志物检测记录.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("淋巴细胞表型检测")) {
-        this.alertReport(
-          "42明鉴/张/MJT-SJ-125-R01 A0 淋巴细胞表面标志物检测记录表.rpx",
-          this.runqianId
-        );
-      } else if (itemName.includes("支原体检测(化学发光法)记录表")) {
-        this.alertReport(
-          "42明鉴/林/MJT-SJ-114-R01 A1 支原体检测(化学发光法)记录表.rpx",
-          this.runqianId
-        );
-      }
+    // juTiItem(info) {
+    //   let itemId;
+    //   let this_ = this;
+    //   var sql =
+    //     "select b.id_ ,c.jian_ce_xiang_mu2 FROM t_mjjcbg a JOIN t_jchzb b ON a.jian_ce_shen_qing = b.shen_qing_dan_id_ JOIN t_mjypb c ON a.jian_ce_shen_qing = c.wai_jian_ WHERE a.id_ = '" +
+    //     info.id_ +
+    //     "'";
+    //   curdPost("sql", sql).then((res) => {
+    //     itemId = res.variables.data;
+    //     this_.runqianId = itemId[0].id_;
+    //     var itemSql =
+    //       "select id_,jian_ce_xiang_mu_ FROM t_mjjcnlfw WHERE id_ IN(" +
+    //       itemId[0].jian_ce_xiang_mu2 +
+    //       ")";
+    //     curdPost("sql", itemSql).then((res) => {
+    //       this_.itemInfo = res.variables.data;
+    //     });
+    //   });
+    // },
+    formEvent(itemId,shujuid) {
+      var itemSql =`select id_,jian_ce_xiang_mu_,yuan_shi_ji_lu_ba FROM t_mjjcnlfw`;
+        curdPost("sql", itemSql).then((res) => {
+          let data = res.variables.data;
+          data.forEach(item=>{
+            if(item.id_ ==itemId){
+              this.alertReport(item.yuan_shi_ji_lu_ba?item.yuan_shi_ji_lu_ba:this_.tongyonglujin,shujuid);
+            }
+          })
+        });
+      // if (itemName.includes("pH检测")) {
+      //   this.alertReport(
+      //     "42明鉴/郑/MJT-SJ-103-R01 A1 pH检测记录.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("渗透压摩尔浓度检测")) {
+      //   this.alertReport(
+      //     "42明鉴/郑/MJT-SJ-105-R01 A2 渗透压摩尔浓度检测记录.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("最低装量")) {
+      //   this.alertReport("42明鉴/张/最低装载量.rpx", this.runqianId);
+      // } else if (itemName.includes("无菌检测(薄膜过滤法)")) {
+      //   this.alertReport(
+      //     "42明鉴/林/MJT-SJ-102-R01 A2 无菌检测薄膜过滤法记录表.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("无菌检测(全自动微生物培养)")) {
+      //   this.alertReport(
+      //     "42明鉴/柯/无菌检测(全自动微生物培养).rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("内毒素检测(凝胶法)")) {
+      //   this.alertReport(
+      //     "42明鉴/卢/MJT-SJ-117-R01 A1 细菌内毒素(凝胶法)检测记录.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("内毒素检测(动态显色法)")) {
+      //   this.alertReport(
+      //     "42明鉴/张/动态显色法检测内毒素记录表.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("手动细胞计数")) {
+      //   this.alertReport(
+      //     "42明鉴/林/MJT-SJ-106-R01 A1 细胞计数检测记录.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("手动细胞活率")) {
+      //   this.alertReport(
+      //     "42明鉴/张/MJT-SJ-107-R01 A1 细胞活率检测记录.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("自动细胞计数和活率(台盼蓝染色法)")) {
+      //   this.alertReport(
+      //     "42明鉴/郑/MJT-SJ-118-R01  A0细胞计数和细胞活率(台盼蓝仪器法)检测记录.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("自动细胞计数和活率(双荧光染色法)")) {
+      //   this.alertReport(
+      //     "42明鉴/郑/MJT-SJ-119-R01  A0细胞计数和细胞活率(双荧光染色法)检测记录.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("牛血清白蛋白残留检测")) {
+      //   this.alertReport(
+      //     "42明鉴/张/MJT-SJ-111-R01 A1 牛血清白蛋白残留量检测.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("青霉素残留检测")) {
+      //   this.alertReport(
+      //     "42明鉴/张/青霉素残留量检测记录表.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("支原体检测(培养法)")) {
+      //   this.alertReport(
+      //     "42明鉴/卢/MJT-SJ-104-R01 A1 支原体检测培养法记录.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("支原体检测(荧光PCR法)")) {
+      //   this.alertReport(
+      //     "42明鉴/卢/MJT-SJ-113-R01 A1支原体检测(荧光PCR法) 副本.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("间充质干细胞表型检测3项")) {
+      //   this.alertReport(
+      //     "42明鉴/柯/间充质干细胞表型检测3项.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("间充质干细胞表型检测5项")) {
+      //   this.alertReport(
+      //     "42明鉴/柯/间充质干细胞表型检测5项.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("间充质干细胞表型检测8项")) {
+      //   this.alertReport(
+      //     "42明鉴/柯/间充质干细胞表型检测8项.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("CIK细胞表型检测")) {
+      //   this.alertReport(
+      //     "42明鉴/林/MJT-SJ-123-R01 A0 CIK细胞表面标志物检测记录表.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("NK细胞表型检测")) {
+      //   this.alertReport(
+      //     "42明鉴/恰/MJT-SJ-124-R01  A0 NK细胞表面标志物检测记录.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("淋巴细胞表型检测")) {
+      //   this.alertReport(
+      //     "42明鉴/张/MJT-SJ-125-R01 A0 淋巴细胞表面标志物检测记录表.rpx",
+      //     this.runqianId
+      //   );
+      // } else if (itemName.includes("支原体检测(化学发光法)记录表")) {
+      //   this.alertReport(
+      //     "42明鉴/林/MJT-SJ-114-R01 A1 支原体检测(化学发光法)记录表.rpx",
+      //     this.runqianId
+      //   );
+      // }
     },
     YubaogaoItem(info) {
       let itemId;

+ 41 - 14
src/views/sample/goodsSelect.vue

@@ -75,9 +75,9 @@
           {{ scope.row.shu_liang_ }}
         </template>
       </el-table-column>
-      <el-table-column prop="shu_liang_" label="入库时间" width="">
+      <el-table-column prop="dao_huo_ri_qi_" label="入库时间" width="">
         <template slot-scope="scope">
-          {{ scope.row.wu_liao_bian_ma_|dhsjFilter(inkuList,scope.row.ru_ku_shi_jian_A_)}}
+          {{ scope.row.dao_huo_ri_qi_}}
         </template>
       </el-table-column>
       <!-- <el-table-column prop="t2" label="t2" width="65">
@@ -103,8 +103,8 @@
 
 <script>
 import curdPost from "@/business/platform/form/utils/custom/joinCURD.js";
-let jsSql = `select id_ as wai_jian_, wu_liao_ming_chen,wu_liao_dai_ma_ AS wu_liao_bian_ma_,gong_ying_shang_ as gong_ying_shang_A,dao_ku_ri_qi_ as ru_ku_shi_jian_A_,pi_hao_,huo_hao_,gui_ge_ AS gui_ge_xing_hao_,dao_huo_shu_liang AS shu_liang_,create_time_ FROM t_wljsysjlb ORDER BY create_time_ DESC LIMIT `;
-let cgSql = `select wai_jian_, wu_liao_ming_chen,wu_liao_bian_ma_,gong_ying_shang_A,ru_ku_shi_jian_A_,pi_hao_,huo_hao_,gui_ge_xing_hao_,shu_liang_,create_time_ FROM t_cgysjlb UNION ALL `;
+let jsSql = `select id_ as wai_jian_, wu_liao_ming_chen,wu_liao_dai_ma_ AS wu_liao_bian_ma_,gong_ying_shang_ as gong_ying_shang_A,pi_hao_,huo_hao_,gui_ge_ AS gui_ge_xing_hao_,dao_huo_shu_liang AS shu_liang_,create_time_,dao_ku_ri_qi_ AS dao_huo_ri_qi_ FROM t_wljsysjlb ORDER BY create_time_ DESC LIMIT `;
+let cgSql = `select a.wai_jian_, a.wu_liao_ming_chen,a.wu_liao_bian_ma_,a.gong_ying_shang_A,a.pi_hao_,huo_hao_,a.gui_ge_xing_hao_,a.shu_liang_,a.create_time_,c.dao_huo_ri_qi_ FROM t_cgysjlb AS a INNER JOIN t_yszb AS c ON a.wai_jian_ = c.id_ UNION ALL `;
 export default {
   data() {
     return {
@@ -278,17 +278,44 @@ export default {
       let quyu = this.quyu;
       let sql = "";
       let this_ = this;
-      let sql1 = `select wu_liao_ming_chen,wu_liao_bian_ma_,gong_ying_shang_A,pi_hao_,huo_hao_,gui_ge_xing_hao_,shu_liang_,wai_jian_,create_time_ FROM t_cgysjlb WHERE wai_jian_ IN ((select id_ FROM t_yszb WHERE (ding_dan_lei_xing !='换货单/常规' OR ding_dan_lei_xing !='换货单/技术') AND shi_fou_guo_shen_='1' AND gong_ying_shang_ ='${quyu}')) UNION ALL select wu_liao_ming_chen,wu_liao_dai_ma_ AS wu_liao_bian_ma_,gong_ying_shang_ asgong_ying_shang_A,pi_hao_,huo_hao_,gui_ge_ AS gui_ge_xing_hao_,dao_huo_shu_liang AS shu_liang_,id_ AS wai_jian_,create_time_ FROM t_wljsysjlb WHERE gong_ying_shang_ ='${quyu}' ORDER BY create_time_ DESC`;
+      let time1,time2;
+      if(this.value2){
+        time1=this.time(this.value2[0]);
+        time2=this.time(this.value2[1]);
+      }else{
+        time1 = '1998-01-01';
+        time2 = '2023-12-29';
+      }
+      let sql1 = `select a.wu_liao_ming_chen,a.wu_liao_bian_ma_,a.gong_ying_shang_A,a.pi_hao_,a.huo_hao_,a.gui_ge_xing_hao_,a.shu_liang_,a.wai_jian_,a.create_time_,c.dao_huo_ri_qi_  FROM t_cgysjlb AS a INNER JOIN t_yszb AS c ON a.wai_jian_ = c.id_ WHERE wai_jian_ IN ((select id_ FROM t_yszb WHERE (ding_dan_lei_xing !='换货单/常规' OR ding_dan_lei_xing !='换货单/技术') AND shi_fou_guo_shen_='1' AND gong_ying_shang_ ='${quyu}')) UNION ALL select wu_liao_ming_chen,wu_liao_dai_ma_ AS wu_liao_bian_ma_,gong_ying_shang_ asgong_ying_shang_A,pi_hao_,huo_hao_,gui_ge_ AS gui_ge_xing_hao_,dao_huo_shu_liang AS shu_liang_,id_ AS wai_jian_,create_time_,dao_ku_ri_qi_ AS dao_huo_ri_qi_ FROM t_wljsysjlb WHERE gong_ying_shang_ ='${quyu}' ORDER BY create_time_ DESC`;
       let sql2 = `select COUNT(*) AS COUNT FROM t_cgysjlb WHERE wai_jian_ IN ((select id_ FROM t_yszb WHERE (ding_dan_lei_xing !='换货单/常规' OR ding_dan_lei_xing !='换货单/技术') AND shi_fou_guo_shen_='1' AND gong_ying_shang_ ='${quyu}')) UNION ALL select COUNT(*) AS COUNT FROM t_wljsysjlb WHERE gong_ying_shang_ ='${quyu}' and bian_zhi_shi_jian`;
-      if (quyu) {
-        sql = sql1;
-        curdPost("sql", sql2).then((res) => {
-          let data = res.variables.data;
-          this_.numtotal = data[0].COUNT + data[1].COUNT;
-        });
-      } else {
-        this_.allLength();
-        sql = cgSql + jsSql + this.limit;
+      if (quyu) { //供应商有
+        if(this.value2){ //时间有
+          sql =  `select a.wu_liao_ming_chen,a.wu_liao_bian_ma_,a.gong_ying_shang_A,a.pi_hao_,a.huo_hao_,a.gui_ge_xing_hao_,a.shu_liang_,a.wai_jian_,a.create_time_,c.dao_huo_ri_qi_  FROM t_cgysjlb AS a INNER JOIN t_yszb AS c ON a.wai_jian_ = c.id_ WHERE wai_jian_ IN ((select id_ FROM t_yszb WHERE (ding_dan_lei_xing !='换货单/常规' OR ding_dan_lei_xing !='换货单/技术') AND shi_fou_guo_shen_='1' AND gong_ying_shang_ ='${quyu}')) AND DATE_FORMAT(c.dao_huo_ri_qi_, '%Y-%m-%d') BETWEEN '${time1}' AND '${time2}' UNION ALL select wu_liao_ming_chen,wu_liao_dai_ma_ AS wu_liao_bian_ma_,gong_ying_shang_ asgong_ying_shang_A,pi_hao_,huo_hao_,gui_ge_ AS gui_ge_xing_hao_,dao_huo_shu_liang AS shu_liang_,id_ AS wai_jian_,create_time_,dao_ku_ri_qi_ AS dao_huo_ri_qi_ FROM t_wljsysjlb WHERE gong_ying_shang_ ='${quyu}' and DATE_FORMAT(dao_ku_ri_qi_, '%Y-%m-%d') BETWEEN '${time1}' AND '${time2}' ORDER BY create_time_ DESC`;
+          sql2 = `select COUNT(*) AS COUNT FROM t_cgysjlb AS a INNER JOIN t_yszb AS c ON a.wai_jian_ = c.id_ WHERE wai_jian_ IN ((select id_ FROM t_yszb WHERE (ding_dan_lei_xing !='换货单/常规'  OR ding_dan_lei_xing !='换货单/技术') AND shi_fou_guo_shen_='1' AND gong_ying_shang_ ='${quyu}')) AND DATE_FORMAT(c.dao_huo_ri_qi_, '%Y-%m-%d') BETWEEN '${time1}' AND '${time2}' UNION ALL select COUNT(*) AS COUNT FROM t_wljsysjlb WHERE gong_ying_shang_ ='${quyu}' and DATE_FORMAT(dao_ku_ri_qi_, '%Y-%m-%d') BETWEEN '${time1}' AND '${time2}'`;
+          curdPost("sql", sql2).then((res) => {
+            let data = res.variables.data;
+            this_.numtotal = data[0].COUNT + data[1].COUNT;
+          });
+        }else{//时间无
+          sql = sql1;
+          curdPost("sql", sql2).then((res) => {
+            let data = res.variables.data;
+            this_.numtotal = data[0].COUNT + data[1].COUNT;
+          });
+        }
+      } else {  //供应商无
+        if(this.value2){ //时间有
+          sql =  `select a.wu_liao_ming_chen,a.wu_liao_bian_ma_,a.gong_ying_shang_A,a.pi_hao_,a.huo_hao_,a.gui_ge_xing_hao_,a.shu_liang_,a.wai_jian_,a.create_time_,c.dao_huo_ri_qi_  FROM t_cgysjlb AS a INNER JOIN t_yszb AS c ON a.wai_jian_ = c.id_ WHERE wai_jian_ IN ((select id_ FROM t_yszb WHERE (ding_dan_lei_xing !='换货单/常规' OR ding_dan_lei_xing !='换货单/技术') AND shi_fou_guo_shen_='1')) AND DATE_FORMAT(c.dao_huo_ri_qi_, '%Y-%m-%d') BETWEEN '${time1}' AND '${time2}' UNION ALL select wu_liao_ming_chen,wu_liao_dai_ma_ AS wu_liao_bian_ma_,gong_ying_shang_ asgong_ying_shang_A,pi_hao_,huo_hao_,gui_ge_ AS gui_ge_xing_hao_,dao_huo_shu_liang AS shu_liang_,id_ AS wai_jian_,create_time_,dao_ku_ri_qi_ AS dao_huo_ri_qi_ FROM t_wljsysjlb WHERE  DATE_FORMAT(dao_ku_ri_qi_, '%Y-%m-%d') BETWEEN '${time1}' AND '${time2}' ORDER BY create_time_ DESC`;
+          sql2 = `select COUNT(*) AS COUNT FROM t_cgysjlb AS a INNER JOIN t_yszb AS c ON a.wai_jian_ = c.id_ WHERE wai_jian_ IN ((select id_ FROM t_yszb WHERE (ding_dan_lei_xing !='换货单/常规' OR ding_dan_lei_xing !='换货单/技术') AND shi_fou_guo_shen_='1')) AND DATE_FORMAT(c.dao_huo_ri_qi_, '%Y-%m-%d') BETWEEN '${time1}' AND '${time2}' UNION ALL select COUNT(*) AS COUNT FROM t_wljsysjlb WHERE  DATE_FORMAT(dao_ku_ri_qi_, '%Y-%m-%d') BETWEEN '${time1}' AND '${time2}'`;
+          curdPost("sql", sql2).then((res) => {
+            let data = res.variables.data;
+            this_.numtotal = data[0].COUNT + data[1].COUNT;
+          });
+        }else{//时间无
+          this_.allLength();
+          sql = cgSql + jsSql + this.limit;
+        }
+
       }
       return sql;
     },